Skip to content

Instantly share code, notes, and snippets.

@LouisaKB
Created September 12, 2018 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LouisaKB/92f623f2a31a39532b8f5e58acf2d778 to your computer and use it in GitHub Desktop.
Save LouisaKB/92f623f2a31a39532b8f5e58acf2d778 to your computer and use it in GitHub Desktop.
function remapLinearRing(linearRing) {
// Converts an array of { 'lat': <lat>, 'lng': <lng> } objects into an array of [<lng>, <lat>].
return linearRing.map(c => [c['lng'], c['lat']])
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment