Created
August 6, 2012 19:23
-
-
Save shortcircuit3/3277760 to your computer and use it in GitHub Desktop.
Accessing the Lat Lng in the results object - Google Maps Geocoder
This file contains 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
// Problem - The variables in the location object change frequently | |
var lat = results[0].geometry.location.Xx; | |
var lng = results[0].geometry.location.Xx; | |
// Solution - Use the lat() and lng() methods instead | |
var lat = results[0].geometry.location.lat(); | |
var lng = results[0].geometry.location.lng(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment