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 Feature Collection of points click only fires on first point #88

Open
benboughton1 opened this issue Nov 26, 2020 · 3 comments
Open

Comments

@benboughton1
Copy link

benboughton1 commented Nov 26, 2020

When I have a GeoJSON feature collection of points I can only get the very first point to provide a popup, same with hover. Has anyone else come across this issue?

When I put a console.log('hello') in the click function it only fires for the first point in the instance. It doesn't seem to pick up any others, yet they are all rendered on the map OK.

@benboughton1 benboughton1 changed the title Feature collection of points click only works on first point GeoJSON Feature Collection of points click only fires on first point Nov 26, 2020
@benboughton1
Copy link
Author

Managed to replicated this in a jsfiddle - some points popup works, others do not:

https://jsfiddle.net/trs1w4vx/11/

@benboughton1
Copy link
Author

It appears the only way to get this working is to flip the geometry field around in the GeoJSON. None of the built in latitudeFirst() or setting lat/lon index in options etc features seem to fix it.

@benboughton1
Copy link
Author

Relates to #69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant