osmdroid MapView: set zoom level and add scale bar.

To set zoom level osmdroid MapView, you can call mapView.getController() to retrieve the controller of the mapView, and call setZo..

Already a Member? Log In to Your Account


osmdroid MapView: set zoom level and add scale bar.

Published on 2012-07-04 10:28:00

To set zoom level osmdroid MapView, you can call mapView.getController() to retrieve the controller of the mapView, and call setZoom(level) of the controller to set the expected zoom level. To add scale bar, new a ScaleBarOverlay object and add it in the overlays of the mapView. Example: myMapController = mapView.getController(); myMapController.setZoom(3); ScaleBarOverlay myScaleBarOverlay = new ScaleBarOverlay(this); mapView.getOverlays().add(myScaleBarOverlay); Previous: - Display Compass on osmdroid MapView

read more: osmdroid MapView: set zoom level and add scale bar.

  Other Posts
© 2006-2013 OnToplist.com, All Rights Reserved