Last active
January 29, 2025 23:54
-
-
Save onderaltintas/f1bc9b3f16f8a96d5821553a5b214786 to your computer and use it in GitHub Desktop.
turf-sandbox snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var polygon = turf.polygon([ | |
[ | |
[116, -33], | |
[131, -20], | |
[130, -43], | |
[155, -25], | |
[133, -9], | |
[111, -22], | |
[116, -33], | |
], | |
],{stroke: '#0FF', fill: '#00000000', 'fill-opacity': 0.3, 'stroke-width': 6}); | |
var pointOnPolygon = turf.pointOnFeature(polygon); | |
return turf.featureCollection([polygon,pointOnPolygon]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://turf-sandbox.netlify.app/