-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
maplibre-gl-js version: 2.1.7
browser: Firefox
Steps to Trigger Behavior
- Add GeoJSON source with point geometry encoded as multipoint
- Set cluster: true for the source
- 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.