Last active
August 29, 2015 14:14
-
-
Save Eccenux/f338e1d25530d9e05a40 to your computer and use it in GitHub Desktop.
Geocoding example
This file contains hidden or 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
// 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