Skip to content

Instantly share code, notes, and snippets.

@tgk
Created December 7, 2011 18:23
Show Gist options
  • Save tgk/1443962 to your computer and use it in GitHub Desktop.
Save tgk/1443962 to your computer and use it in GitHub Desktop.
var geocoder;
var _this = this;
geocoder = new google.maps.Geocoder;
geocoder.geocode({
address: "Margrethepladsen 4, 8000, DK"
}, function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
return console.log("(" + (results[0].geometry.location.lng()) + ", " + (results[0].geometry.location.lat()) + ")");
} else {
return alert("Unable to query service for address \"" + location + "\"");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment