androidbing-mapsbingbing-api

Android: Bing Maps API - ZOOM IN programmatically


I need to make default scale of

 MapView map = new MapView(this, MapRenderMode.VECTOR); 

twice as large (zoom in). I'm using Android Java, no JS


Solution

  • If you want to zoom in by 2x each time, zoom level is appropriate. Each zoom level is 2x the previous one. For your map instance:

    map.setScene(MapScene.createFromLocationAndZoomLevel(map.getCenter(), map.getZoomLevel + 1), MapAnimationKind.LINEAR);