Created
December 1, 2022 14:07
-
-
Save jarodium/45dcdc7013f031d73bbd76082bc6fc6b 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.935581406636273, 37.01906884977351 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#F00', 'marker-size': 'large'} | |
| ); | |
| const b = turf.point( | |
| [ -7.935580423701978, 37.0195185092705 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#F0F', 'marker-size': 'large'} | |
| ); | |
| const c = turf.point( | |
| [ -7.935862144816655, 37.01945865839267 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#FF0', 'marker-size': 'large'} | |
| ); | |
| const d = turf.point( | |
| [ -7.935298965968009, 37.019457873583974 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#FF6', 'marker-size': 'large'} | |
| ); | |
| const e = turf.point( | |
| [ -7.935093189041637, 37.0192929988613 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#0F6', 'marker-size': 'large'} | |
| ); | |
| const f = turf.point( | |
| [ -7.935093189041637, 37.0192929988613 ] , | |
| {'marker-symbol': 'rocket', 'marker-color': '#0F6', '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, d, e,f]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment