Optimize setWaypoints performance (#312)

Loading a track as route with lots of waypoints (simplify tolerance of 0) caused a long pause before even handling the first route request.

This seems to be caused by a repaint for every added marker/layer. Adding them all at once in FeatureGroup.addTo(map) helps (although still added in a loop).
This commit is contained in:
Norbert Renner 2020-07-01 10:35:50 +02:00
parent 4892c2a1db
commit bacf60a3ba
3 changed files with 22 additions and 6 deletions

View file

@ -65,7 +65,7 @@
"leaflet-hotline": "^0.4.0",
"leaflet-plugins": "~3.0.0",
"leaflet-providers": "^1.5.0",
"leaflet-routing": "nrenner/leaflet-routing#62bf722",
"leaflet-routing": "nrenner/leaflet-routing#e94e153",
"leaflet-sidebar-v2": "nrenner/leaflet-sidebar-v2#dev",
"leaflet-triangle-marker": "^1.0.2",
"leaflet.locatecontrol": "^0.60.0",