回答

0

例如,您可以使用moveCamera以及上次存储的位置(lat,lng或zoomLevel)。

final LatLng location = new LatLng(..., ...);// Loaded from SharedPreferences maybe. 

// Move the camera to location with a zoom of 15. 
map.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 15)); 
0

您可以使用此示例代码的直接映射动画到你的城市坐标(纬度,经度),并自动缩小到指定级别:

// Set desired lat lng location, and zoom level (for example 10) 
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(locationCity.getLatitude(), locationCity.getLongitude()), 10); 
// Move the camera to location 
gMap.animateCamera(cameraUpdate); 
相关问题