Created
June 5, 2015 10:17
-
-
Save jarodium/75922d700327cc390298 to your computer and use it in GitHub Desktop.
verificar se o texto de um input é um Google Place válido
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
function is_location_valid(address, address_success_div) | |
{ | |
var geocoder = new google.maps.Geocoder(); | |
geocoder.geocode( {"address": address}, function(results, status) { | |
if (status == google.maps.GeocoderStatus.OK) | |
{ | |
address_success_div.innerHTML = "SUCCESS"; | |
} | |
else | |
{ | |
address_success_div.innerHTML = "FAILURE"; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment