-
Notifications
You must be signed in to change notification settings - Fork 46
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
Some areas of MultiPolygon not returning from pointInLayer #7
Comments
Found a fix, but it's probably a bit too hacky for a PR. Rather than eachLayer through an L.MultiPolygon then call getLlgs, I concatenated the coordinates from feature.geometry.coordinates[0] to get the same result: The example above now works when clicking on any polygon in the MultiPolygon. |
Please don't close this issue if the issue isn't fixed. |
Sorry about that! |
The behavior that I am observing when using the packaged version of the library from https://unpkg.com/@mapbox/[email protected]/leaflet-pip.js , is that it is not detecting the point within multipolygons. Probably because
This means the pointInMultiPolygon function is never called. A different version of |
I'm having a weird issue with a MultiPolygon not returning the layer when clicking on said layer.
I've modified the example you created to highlight the issue I am seeing:
http://rousseau.io/leaflet-pip/
Code for the site can be found here:
https://github.com/jvrousseau/leaflet-pip/blob/gh-pages/site/site.js
Here is the GeoJSON for the polygon that is shown in the example:
https://github.com/jvrousseau/leaflet-pip/blob/gh-pages/site/broken.js
Please let me know if there is any other information I can provide.
More than likely, I am either doing something wrong, or the GeoJSON is bad in some way, shape, or form. Please let me know if that's the case.
The text was updated successfully, but these errors were encountered: