Skip to content

Instantly share code, notes, and snippets.

@robtarr robtarr/geocode-script.js
Last active Aug 29, 2015

Embed
What would you like to do?
Code samples for Event Map Foundry post
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;
}
set :output, "/log/cron_log.log"
every 1.hour do
command "cd #{server_path} && coffee google.coffee map-data.json"
end
table = tabletop.init
key: "############################################"
callback: (data) =>
# do things
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.