mapbox / mapbox/leaflet-pip

Some areas of MultiPolygon not returning from pointInLayer

Open
#7 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
202
Forks
44
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using the example at http://rousseau.io/leaflet-pip/, then inspect site/site.js and the GeoJSON in site/broken.js. Trace the pointInLayer result for clicks across the MultiPolygon and compare it with a working polygon. Done means the affected MultiPolygon areas return their layer consistently, with the example still behaving correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.