ProminentEdge / leaflet-measure-path

Show measurements on Leaflet paths

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No support for nested polygons (aka multipolygons)

asavartsov opened this issue · comments

It would be great to support distances and area on multipolygons and multipolylines, they have just another array depth in latlng arrays (http://leafletjs.com/reference-1.0.0.html#polygon).

I did a quick fix for my project but you probably could do better.

https://github.com/asavartsov/leaflet-measure-path/blob/master/leaflet-measure-path.js#L263
https://github.com/asavartsov/leaflet-measure-path/blob/master/leaflet-measure-path.js#L316

I agree with this one. It was my solution for multipolygons!

Thank you so much for sharing!