Skip to content

Instantly share code, notes, and snippets.

@jomel
jomel / script.turf-sandbox
Created July 11, 2025 16:22
turf-sandbox snippet
// simply return a valid GeoJSON and it will be rendered on the map
const poly = turf.polygon([[
[-122.3104, 47.6627],
[-122.3071, 47.6627],
[-122.3071, 47.6644],
[-122.3104, 47.6644],
[-122.3104, 47.6627]
]],
{stroke: '#0FF', fill: '#0FF', 'fill-opacity': 0.3, 'stroke-width': 6}
@jomel
jomel / script.turf-sandbox
Created July 11, 2025 15:58
turf-sandbox snippet
// simply return a valid GeoJSON and it will be rendered on the map
const p = turf.point(
[-122.3093, 47.6638],
{'marker-symbol': 'rocket', 'marker-color': '#F00', 'marker-size': 'large'}
);
const l = turf.lineString(
[[-122.3116, 47.6623], [-122.3052, 47.6650]],
{'stroke-width': 3, stroke: '#00F'}
);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.