Created
December 1, 2022 13:49
-
-
Save jarodium/eb732d48ba2c0571994627ccc84b91e9 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
// simply return a valid GeoJSON and it will be rendered on the map | |
const a = turf.point( | |
[ -7.934943903756626, 37.01653427320952 ] , | |
{'marker-symbol': 'rocket', 'marker-color': '#F00', 'marker-size': 'large'} | |
); | |
const b = turf.point( | |
[ -7.934943723892553, 37.01653427320952 ] , | |
{'marker-symbol': 'rocket', 'marker-color': '#F0F', 'marker-size': 'large'} | |
); | |
const c = turf.point( | |
[ -7.934943723892553, 37.01653427320952 ] , | |
{'marker-symbol': 'rocket', 'marker-color': '#F1F', 'marker-size': 'large'} | |
); | |
console.log(a.geometry.coordinates.reverse()); | |
console.log(b.geometry.coordinates.reverse()); | |
console.log(c.geometry.coordinates.reverse()); | |
const l = turf.lineString( | |
[[-122.3116, 47.6623], [-122.3052, 47.6650]], | |
{'stroke-width': 3, stroke: '#00F'} | |
); | |
return turf.featureCollection([a, b, c]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment