Question

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.

Was it helpful?

Solution

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

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

OTHER TIPS

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();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top