Skip to content

Instantly share code, notes, and snippets.

@chrispahm
Created December 5, 2017 16:59
Show Gist options
  • Save chrispahm/fca0da210726aa10b075c1e75a2c8367 to your computer and use it in GitHub Desktop.
Save chrispahm/fca0da210726aa10b075c1e75a2c8367 to your computer and use it in GitHub Desktop.
var resizedPoly = turf.transformScale(polygon, 1000)
Draw.add(resizedPoly)
Draw.add(turf.simplify(resizedPoly, {tolerance: 0.05, highQuality: true}))
Draw.add(turf.simplify(resizedPoly, {tolerance: 0.4, highQuality: true}))
vorgewende.lineString(turf.simplify(resizedPoly, {tolerance: 0.05, highQuality: true}),38)
map.fitBounds(turf.bbox(resizedPoly))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment