i am using the following javascript code and it was working. suddenly, it started returning only the longitude and the latitude was null.
Why am I getting this kind of sporadic response ? Any clue ?
var place = search.autocomplete.getPlace();
$('#lat').val(place.geometry.location.$a);
$('#lng').val(place.geometry.location.ab);
EDIT:
on printing the place, I see that “$a” got changed to “ab” and “ab” got changed to “cb”. surprise. How do I take care of this, if they change it in future again ?
These are internal variables that you should not directly access. Please use the documented methods instead.
For example: