我在Google地图上有一个图像作为覆盖图,并且由于我只有左上角的坐标,所以我将图像的左上角放在该坐标上,现在我想使其焦点集中在应用程序中,因此我必须将CameraUpdetFactory.newLatLngZoom(centerilizedLatLng,zoomLevel)中的中心坐标这种方法,那么我该如何计算此图像的中心坐标?
要获取LatLng作为Google地图的中心,只需使用:
mMap.getProjection().getVisibleRegion().latLngBounds.getCenter();
或
mMap.getCameraPosition().target
快乐编码:)