I have on the map 700 markers and it works too slow.
Now I hide markers which do not fall into the visible area but it does not help.
procedure TfrmCity.OnMapZoomChange (Sender: TObject; NewLevel: Integer);
begin
frmCity.DBMap1.GetMapBounds;
end;
procedure MapsOnBoundsRetrieved(Sender: TObject; Bounds: TBounds);
var
i, c: integer;
begin
c := frmCity.DBMap1.Markers.Count-1;
for i := 0 to c do
begin
if (frmCity.DBMap1.Markers.Longitude > Bounds.SouthWest.Longitude) and
(frmCity.DBMap1.Markers.Longitude < Bounds.NorthEast.Longitude) and
(frmCity.DBMap1.Markers.Latitude > Bounds.SouthWest.Latitude) and
(frmCity.DBMap1.Markers.Latitude < Bounds.NorthEast.Latitude)
then
frmCity.DBMap1.Markers.Visible := True else frmCity.DBMap1.Markers.Visible := False;
end;
end;
Can you suggest something else to improve the speed?
p.s.
Google My Maps with 700 markers works fast