Pregunta

I need to zoom out my map. I have tried --mMapView.zoomout();-- but it only zoom out 1 level, I want to zoom out further. I know can do in .xml --mapoptions.ZoomLevel="5"-- but I wanted to put in my Activity Class. Some guides is needed, thank you very much.

¿Fue útil?

Solución

MapOptions option = new MapOptions(MapOptions.MapType type);
// Sets zoom level.
option.setZoom(int zoom);

// Switches basemap by the given options.
mMapView.setMapOptions(MapOptions options);

Otros consejos

I think, Best way to handle zoom with animation,Even, it will work nice if you add any other layer like "One Map".

/* set zoom level */

double LEVEL=5;

mMapView.centerAt(lat, lng, false);
mMapView.setScale(ZOOM_LEVEL, true);

if you want to show current location with proper Zooming use below code

mMapView.getLocationDisplayManager().setAutoPanMode(LocationDisplayManager.AutoPanMode.LOCATION);

mMapView.getLocationDisplayManager().start();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top