Hi TMS Team,
We use TMS maps for different tasks.
For example for live gps trackers. This window may display up to 1K markers.
the content is based on SQL and may be filtered by user from GUI.
I've converted this map to FNC and found that FNC OpenLayers is not very responsive
if you have 200-300 markers.
with 500-1000 - it's not responsive (pan, zoom). Other maps are OK.
despite add & delete marker is still slower in FNC for other providers, with many markers (500-1000)
- those maps are quite responsive: can zoom and pan.
TMS OS Maps (previous version of maps) works very good with 1000+ markers -
I can pan and zoom without any issues. Add / Delete is much faster.
I have a test app, with 2 maps side-by-side and can compare old vs new maps performance.
OpenLayers map itself in FNC is very smooth (much better than old one),
but adding more markers is causing significant performance degradation, exponentially.
It's obvious even visually: on FNC OpenLayers Map I can see how each marker added or deleted + map not responsive at the end.
if you need my example - I can email.
there is nothing special in this example: just FNC Map and OS Map, 2 buttons (add, delete markers),
and edit box / for # of markers to add.
As I have mentioned - it's FNC OpenLayers issue mainly.
Most of our customers use TMS OS Maps now for viewing.
I.e. I can't switch them to FNC Map solution because GPS tracker will hang with 300 markers.
Thanks
procedure TForm1.btnAddMarkersClick(Sender: TObject);
var
i: integer;
FNC_Point: TTMSFNCMapsCoordinateRec;
IconName: string;
begin
TMSFNCMaps1.BeginUpdate;
IconName := 'file://C:/Source/iwwebgmaps_pin.png';
with TMSFNCMaps1 do
for i := 0 to edtNumMarkers.Value - 1 do
begin
FNC_Point.Latitude := Options.DefaultLatitude+ Random(100)* 0.02;
FNC_Point.Longitude := Options.DefaultLongitude+ Random(100)* 0.03;;
AddMarker(FNC_Point, IntToStr(i), IconName);
end;
TMSFNCMaps1.EndUpdate;
for i := 0 to edtNumMarkers.Value - 1 do
begin
FNC_Point.Latitude := TMSFNCMaps1.Options.DefaultLatitude+ Random(100)* 0.02;
FNC_Point.Longitude := TMSFNCMaps1.Options.DefaultLongitude+ Random(100)* 0.03;;
WebOSMaps1.Markers.Add(FNC_Point.Latitude, FNC_Point.Longitude, IntToStr(i), IconName, false, true);
end;
end;
procedure TForm1.btnDelMarkersClick(Sender: TObject);
var
i: integer;
begin
TMSFNCMaps1.BeginUpdate;
TMSFNCMaps1.ClearMarkers;
TMSFNCMaps1.EndUpdate;
with WebOSMaps1 do
for i := Markers.Count - 1 downto 0 do
Markers.Delete(i);
end;