Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

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

@nrenner

Description

@nrenner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions