design - Leaflet.js - How can I draw a polygon that automatically covers a group of markers? -


i´m working leaflet.js , have lot of markers want polygon drawn automatically containing specific group of markers.

there´s image:

enter image description here

every marker has specific radio, if use it, this:

enter image description here

but don't want that, want area contains markers, don't know how can that.

you might want create convex hull.

https://gis.stackexchange.com/questions/215137/how-to-create-a-convex-hull-with-leaflet-points:

"the easiest way javascript use turf.js's convex functionality."

a working sample - http://bl.ocks.org/ebrelsford/c31f61d39d2cd559e18a


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -