Turf is a collection of independent Javascript modules providing common geospatial capabilites, against geometries encoded in GeoJSON format. It can be run in a Nodejs environment or included in a minified form in a script tag. It draws heavily on the JSTS (Javascript Topology Suite) library under the hood.
Questions tagged [turfjs]
289 questions
0
votes
1 answer
Openlayers 2.12 JSON layer color with TURF algorithms
I have different turf operations and now I want it some style. I have all the operations result in ee9900, that i think is the default colour of openlayers 2.12
So the think is I have a function that take the result and now I want it to put some…

VFG
- 23
- 5
0
votes
1 answer
Turf.js erase produces polygon with wrong projection
I am using turfjs erase together with the leaflet draw plugin to subtract existing polygons from the new polygon being drawn. However the result polygon does not display correctly on the map and this seems to be a projection…

Paul Jordaan
- 65
- 7
0
votes
0 answers
Web Worker not returning result of performing operation
I have a web worker that is not returning the result of performing a computation,the method looks like this:
self.checkIntersectionForLayerWith = function checkIntersectionForLayerWith(data) {
var checkIntersectionForLayer = function…

vamsiampolu
- 6,328
- 19
- 82
- 183
0
votes
1 answer
Leaflet-Omnivore make external file.geojson available to javascript variable
I'm using the Omnivore extension to load my GeoJSON files into a Mapbox/ Leaflet map. Later, I'm using Turf.js on this data.
I'm loading the external GeoJSON file to the map as a customLayer, but having trouble making the GeoJSON data available in…

Paul
- 103
- 5
0
votes
1 answer
Drag marker and update Turf.js buffer
I'm trying to create a map where a marker is draggable and it buffer move along. Very similar (almost the same) than what this question is dealing with, the thing in my case is that I'm not using Mapbox.js only plain leaflet. My current code is:
…

Ricardo Oliveira
- 97
- 1
- 6
0
votes
1 answer
Find whether lat/long coordinate is inside any Leaflet polygon
I would like to check which polygon layer (if any) contains a given lat/long (provided by map.locate()).
I know you can do this using Turf's inside() function but is it possible with pure Leaflet?

Steve Bennett
- 114,604
- 39
- 168
- 219
0
votes
2 answers
Turf.buffer and a draggable marker
So far I have created a marker, transfered it to geoJSON, and created a buffer around it with Turf.buffer. How can I get this buffer to "stick" to the marker as I drag it around the map?