我正在将我的谷歌地图版本从 1 升级到版本 2,但是我遇到了一个问题,因为我曾经使用getMapCenter()但我无法在 v2 中使用它
任何帮助表示赞赏。提前致谢。
我正在将我的谷歌地图版本从 1 升级到版本 2,但是我遇到了一个问题,因为我曾经使用getMapCenter()但我无法在 v2 中使用它
任何帮助表示赞赏。提前致谢。
You can use gMap.getCameraPosition().target
where gMap
is the GoogleMap instance from your activity.
This will return a LatLng object which is the coordinate of the center of the map.
According to this, the target is "The location that the camera is pointing at."