Skip to content

geojson with multipoint geometry clustering makes points disappear with no console warning #1086

@ttomasz

Description

@ttomasz

maplibre-gl-js version: 2.1.7

browser: Firefox

Steps to Trigger Behavior

  1. Add GeoJSON source with point geometry encoded as multipoint
  2. Set cluster: true for the source
  3. Add layer with filter ["has", "point_count"]

Link to Demonstration

https://jsbin.com/gadusezode/edit?html,output

Expected Behavior

There should be a warning in console about unsupported geometry type.

Actual Behavior

Cluster points just don't appear for no apparent reason.

I know this might be a weird issue.

I was handed GeoJSON generated by someone in QGIS, I added it to MapLibre and saw the points. I knew the geometries were "weird" since they had third number and were of type multipoint but I thought it didn't matter since points were rendering fine and I didn't want to do another back and forth of explaining how they should save the file in QGIS. Later on when we wanted to turn on clustering it turned out that cluster points are not displayed on the map.

I think it would be nice if there was a warning in console if geojson geometries are not in a fully supported format e.g. CRS not EPSG:4326 (first geojson that i received was in epsg:3857 and didn't work at all :), geometry types like multipoint etc.

If possible clustering feature could also support more geometry types but not sure how complicated that would be and there probably isn't much demand for that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions