Google maps - Weird geometry.location attributes (G, K)

只谈情不闲聊 提交于 2019-12-17 22:28:44

问题


When I access the Places API, Google sends back an object with, among other things, these two properties :

location.geometry.G
location.geometry.K

These represent the latitude and longitudes. I never read about these anywhere. Besides, all my codebase recently became unstable because it recently changed for the letters H & L.

This is weird, isn't it ? What did I miss ?


回答1:


Those are undocumented properties of the API (the latitude and longitude of that particular google.maps.LatLng object)

Access them reliably by using the documented methods (.lat(), .lng())



来源:https://stackoverflow.com/questions/32614504/google-maps-weird-geometry-location-attributes-g-k

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!