Created
August 4, 2014 19:06
-
-
Save bytefade/e6c7cd3cc7d8540548d6 to your computer and use it in GitHub Desktop.
link javascript para apontar no mapa com base no endereço, coords etc.
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
//Direciona para mapa | |
function geocode() { | |
var address = "-23.608290506940648, -46.69083239999998"; | |
geocoder.geocode({ | |
'address': address, | |
'partialmatch': true}, geocodeResult); | |
} | |
function geocodeResult(results, status) { | |
if (status == 'OK' && results.length > 0) { | |
map.fitBounds(results[0].geometry.viewport); | |
} else { | |
alert("Geocode was not successful for the following reason: " + status); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment