Skip to content

GeoJSON MultiLineString and MultiPolygon only render first one of each #9533

Open
@piranna

Description

At

case 'LineString':
case 'MultiLineString':
latlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng);
return new Polyline(latlngs, options);
case 'Polygon':
case 'MultiPolygon':
latlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng);
return new Polygon(latlngs, options);
, we see that GeoJSON both MultiLineString and MultiPolygon types are rendering only their first geometry, instead of all of them. Since we have MultiPoint, GeometryCollection and FeatureCollection that are being properly rendered using a FeatureGroup object, fix should be trivial to do, just replicate the same thing of creating the layers in a loop and group them in the FeatureGroup object.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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