如何在谷歌地图v2中为android中的当前位置(pin)设置缩放级别



我完美地设置了谷歌地图v2,但我不知道如何设置当前位置(当前pin)的缩放级别。如果你有任何想法,请与我分享。谢谢。

GoogleMap theMap;
//in the below function pass your LatLang and the zoom level 
theMap.animateCamera(CameraUpdateFactory.newLatLngZoom(Your Pin LatLangPoint, 14));

在我的情况下,我从阵列中获取地理点,您可以尝试类似的操作或修改代码,然后使用地图控制器设置缩放级别

private MapController mapController;
GeoPoint[] mallCoords;
mallCoords = new GeoPoint[24];
mallCoords[0] = new GeoPoint(28701067, 77116834);//this is just an example
mapController.animateTo(mallCoords[0]);
mapController.setZoom(15);

最新更新