Possible Duplicate:
google.maps.Geocoder.geocode() geometry.location lat/lng property names change frequently
I use Google Map v3 and its geocoder api in my applicaiton. I use this url to get refer to the api: http://maps.google.com/maps/api/js?key=key&sensor=false
The following code used to work very well:
geocoder.geocode(
{'address': address }, function(data, status)
{
var lat = data[0].geometry.location.Ya;
var lng = data[0].geometry.location.Za;
});
But since the api changed on 18th of Nov, this code cannot get the lat and lng information anymore:
var lat = data[0].geometry.location.Ya;
var lng = data[0].geometry.location.Za;
I need to use:
var lat = data[0].geometry.location.$a;
var lng = data[0].geometry.location.ab;
I understand that the problem can be fixed by:
var latlng = data[0].geometry.location;
var lat = latlng.lng();
var lng = latlng.lat();
But is it weired to keep on changing the variable's name? This happened on 22nd of October, now it is changed again. I am just wondering if anybody had the similar problem before? Is there a Google Map v3 javascript URL with version number so that I don't need to use the latest version? Thanks in advance.