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

measure plugin is not working over geojson layer #6

Open
softlove1 opened this issue Aug 24, 2013 · 1 comment
Open

measure plugin is not working over geojson layer #6

softlove1 opened this issue Aug 24, 2013 · 1 comment

Comments

@softlove1
Copy link

measure plugin is not working over geojson layer. there is any way to implement this plugin over any geojson polygon layer.

@DrPandemic
Copy link

Even if it's an old post, this could help someone.
I'm not completly sure why, but the geojson layers don't manage click events exactly like other layers. I tried to hack it in leaflet, but the projet is simply too big for a quick hack.
In my fork I "fixed" it (it's not really a fix). I simply added a new custom event listener. Every time that I was listening an event on a geojson layer I simply added

map.fire('measure:click', e);

to be able to receive the blocked event in leaflet.measure.

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

2 participants