Skip to content

Instantly share code, notes, and snippets.

@sruf
Created October 9, 2019 08:24
Show Gist options
  • Save sruf/937cbed3fbb7dec13a8d2e9d8148b2e3 to your computer and use it in GitHub Desktop.
Save sruf/937cbed3fbb7dec13a8d2e9d8148b2e3 to your computer and use it in GitHub Desktop.
/**
* Geocode address using Google Maps
*
* @param address the address to geocode
* @return the geocoded address (possibly approximate)
*/
function GEOCODE(address) {
var location = Maps.newGeocoder().geocode(address).results[0].geometry.location;
return [[location.lat, location.lng]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment