Jul 4, 2012

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 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.


        myMapController = mapView.getController();
        ScaleBarOverlay myScaleBarOverlay = new ScaleBarOverlay(this);

set zoom level and add scale bar on osmdroid MapView

- Display Compass on osmdroid MapView

No comments:

Post a Comment

Infolinks In Text Ads