Skip to content

Instantly share code, notes, and snippets.

@robtarr
Created April 17, 2014 13:35
Show Gist options
  • Save robtarr/10983916 to your computer and use it in GitHub Desktop.
Save robtarr/10983916 to your computer and use it in GitHub Desktop.
Geocoding script for Google Drive Spreadsheets
function geoCode(addr){
var gc = Maps.newGeocoder();
var geoJSON = gc.geocode(addr);
var lat = geoJSON.results[0].geometry.location.lat;
var lng = geoJSON.results[0].geometry.location.lng;
return lat + ", " + lng;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment