Skip to content

Instantly share code, notes, and snippets.

@jomel
Created July 11, 2025 16:22
Show Gist options
  • Select an option

  • Save jomel/c4426ce06e06d3708ac15a884512f47a to your computer and use it in GitHub Desktop.

Select an option

Save jomel/c4426ce06e06d3708ac15a884512f47a to your computer and use it in GitHub Desktop.
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}
);
return turf.featureCollection([poly]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment