开发者

how to set default zoom level in android google map?

开发者 https://www.devze.com 2022-12-21 07:58 出处:网络
i want to set default zoom level in google map to 11 miles can any one guide me how to achieve this? any help would be appriciate开发者_如何转开发d.Something like this:

i want to set default zoom level in google map to 11 miles can any one guide me how to achieve this?

any help would be appriciate开发者_如何转开发d.


Something like this:

MaView mapView = (MapView)findViewById(R.id.my_map);
MapController mapController = mapView.getController();
mapController.setZoom(14);    // this isn't 11 miles.

Or maybe you have a MapActivity? In that case, the idea is the same, but you'll get the MapView differently.


newLatLngZoom() is the method to set zooming level. 14f is the zoom level.

   mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(marker, 14F))
0

精彩评论

暂无评论...
验证码 换一张
取 消