Turf is a JavaScript library which allows digital maps to implement many mutual GIS functions. Using Turf digital maps tin move perform geospatial processing tasks alongside GeoJSON data. Turf connects to Leaflet, together with is also directly available every bit a Mapbox.js plugin.
You tin move instruct a corking overview of the arrive at of Turf's geospatial processing capabilities on the Turf examples page. Using the library alongside Leaflet together with Mapbox is real easy. It took me less than xv minutes to set-up this map of central London police line stations. I grabbed the GeoJSON information for the stations using Overpass Turbo together with thence exactly used the html for the turf-nearest example inward the Turf documentation.
The map shows the nearest London police line station to a for sure point. The queried place is pre-determined inward this map but it should hold upwardly a unproblematic work to brand the marking of the queried place draggable. Turf tin move procedure the geospatial enquiry inward the browser thence it should hold upwardly unproblematic to allow users to enquiry the map to notice the nearest police line station to whatsoever location.
Buat lebih berguna, kongsi: