Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to get coordinates of map's corners like shown in the image
使用map.getBounds(). 这将返回一个 LatLngBounds 对象。然后,您可以从中使用getNorthEast()并getSouthWest()获得这些角落。这些不是你想要的,所以你必须做一些逻辑来弄清楚西北和东南部分。即使用lat()NorthEast 角的 和lon()SouthWest 角的 用于 NorthWest 坐标,lon()NorthEast 角的 与lat()SouthWest 角的 用于 SouthEast 坐标。
map.getBounds()
getNorthEast()
getSouthWest()
lat()
lon()