leaflet-routing
leaflet-routing copied to clipboard
Leaflet 1.0: Removed MultiPolyline and MultiPolygon in LineUtil.Snapping.js
LineUtil.Snapping.js includes MultiPolyline and MultiPolygon cases, which are removed since Leaflet 1.0:
- Removed MultiPolyline and MultiPolygon classes since multiple rings are now handled by Polyline and Polygon classes respectively. Layers with multiple rings now perform much better (since each is now physically a single path object instead of being a FeatureGroup of layers).
It would now need to handle multi-dimensional arrays with Polyline and Polygon. In addition, the instanceof L.Polyline
condition also matches Polygons as the Polygon class extends from Polyline.
But I'm wondering if there really is a use-case for snapping to all kinds of geometries.
Still seems to work fine when restricting geometries to LineString
like in the osm.html example.