I am using google maps to find lat and lng of the clicked location. After stringifying the javascript event object, I found
{"latLng":{"Za":25.800813110356653,"$a":78.7055234375},"pixel":{"x":689,"y":336},"va":{"x":183.96837222222223,"y":108.99927181860028}}
So Za is lat and $a is lng now.
Though two days ago, I was using exact same code and getting the same object as:
{"latLng":{"Ya":25.800813110356653,"Za":78.7055234375},"pixel":{"x":689,"y":336},"va":{"x":183.96837222222223,"y":108.99927181860028}}
What bothers me is that they have changed the object names overnight. Why do they do this and is there any reliable way to find latitude and longitude instead?
Internal names will change with code changes: if another token is introduced then a variable which was minifed as Ya
may end up being Za
.
You should never access internal references. Always use documented methods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With