leaflet-routing icon indicating copy to clipboard operation
leaflet-routing copied to clipboard

Leaflet 1.0: Removed MultiPolyline and MultiPolygon in LineUtil.Snapping.js

Open nrenner opened this issue 7 years ago • 0 comments

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).

Changelog 1.0-beta1

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.

nrenner avatar Jun 03 '17 13:06 nrenner