Timeline for leaflet geojson coordinates to array
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 7, 2017 at 22:09 | vote | accept | Adam | ||
Dec 7, 2017 at 18:14 | comment | added | Bill Chappell | The link may help, the last four topics here are close. I use Turf to get features inside the polygon. gistechsolutions.com/leaflet/DEMO | |
Dec 7, 2017 at 18:13 | comment | added | Bill Chappell | Your array would have worked you were missing "layer.feature.properties." You had "feature.properties. gistechsolutions.com/leaflet/DEMO/Select/SelectPoints3.html Takes a click and finds sites within a distance of. and creates a new geojson layer. This creates an array and brings the points in as a layer and if I added map.fitBounds(geojsonLayer.getBounds(), {padding: [12, 12]}) It would zoom to the selected set. | |
Dec 7, 2017 at 15:17 | comment | added | Adam | Hi yeah that seems to have worked, however I'm actually trying to pull the coordinates into the array upon clicking a poly. I've tried to add "var coords = layer.feature.geometry.coordinates; into my ZoomToFeature however the console error becomes layer is not defined. | |
Dec 7, 2017 at 15:10 | history | answered | Bill Chappell | CC BY-SA 3.0 |