Skip to content

Instantly share code, notes, and snippets.

@imbcmdth
Created September 1, 2012 00:08
Show Gist options
  • Save imbcmdth/3561550 to your computer and use it in GitHub Desktop.
Save imbcmdth/3561550 to your computer and use it in GitHub Desktop.
var locations = JSON.parse(body);
locations = _.first(locations, 10);
_.map(locations, function(loc) {
geocoder.geocode(loc.loc_address + ',' + loc.loc_city + ',' + loc.loc_state + ',' + loc.loc_zip, function(err, data) {
if (err)
errorHandler(err);
// console.log(data.results[0].geometry.location);
loc.location = data.results[0].geometry.location;
// done();
return loc;
});
});
fn(locations);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment