Skip to content

Instantly share code, notes, and snippets.

@Eccenux
Last active August 29, 2015 14:14
Show Gist options
  • Save Eccenux/f338e1d25530d9e05a40 to your computer and use it in GitHub Desktop.
Save Eccenux/f338e1d25530d9e05a40 to your computer and use it in GitHub Desktop.
Geocoding example
// see: https://developers.google.com/maps/documentation/javascript/geocoding
var geocoder = new google.maps.Geocoder();
geocoder.geocode({
address: someAddressString,
region: 'no'
},
function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var location = results[0].geometry.location;
latitude.value = location.lat();
longitude.value = location.lng();
} else {
alert('Serwer umarł');
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment