Created
April 17, 2014 13:35
-
-
Save robtarr/10983916 to your computer and use it in GitHub Desktop.
Geocoding script for Google Drive Spreadsheets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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