Skip to content

Instantly share code, notes, and snippets.

@NotZombieFood
Created June 17, 2018 02:12
Show Gist options
  • Save NotZombieFood/1a58015675cd6d0903253ab784293c7b to your computer and use it in GitHub Desktop.
Save NotZombieFood/1a58015675cd6d0903253ab784293c7b to your computer and use it in GitHub Desktop.
find point inside feature using turf
for (var i = 0; i < geojsontest["features"].length; i++) {
var poly = geojsontest["features"][i]["geometry"];
var isInside1 = turf.inside(pt1, poly);
if(isInside1){
console.log(geojsontest["features"][i]["properties"]["letter"]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment