leaflet.measure
leaflet.measure copied to clipboard
measure plugin is not working over geojson layer
measure plugin is not working over geojson layer. there is any way to implement this plugin over any geojson polygon layer.
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.