Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ttomasz opened this issue Mar 10, 2022 · 3 comments
Labels
enhancement New feature or request PR is more than welcomed Extra attention is needed

Comments

@ttomasz
Copy link

ttomasz commented Mar 10, 2022

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.

@ttomasz ttomasz changed the title geojson with multipoint geometry clustering makes points disappear with console no warning geojson with multipoint geometry clustering makes points disappear with no console warning Mar 10, 2022
@HarelM HarelM added enhancement New feature or request PR is more than welcomed Extra attention is needed labels Aug 21, 2022
@HarelM
Copy link
Collaborator

HarelM commented Aug 21, 2022

Feel free to submit a PR or at least send a reproduction example of this issue in case someone would like to try and add this warning.

@frodrigo
Copy link

frodrigo commented Mar 5, 2024

@HarelM
Copy link
Collaborator

HarelM commented Mar 5, 2024

I guess your best bet would be to try and open a PR for the supercluster repo...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR is more than welcomed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants