Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 25th, 2012  |  syntax: None  |  size: 0.57 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. how to make to react zoom in-out on the mapview
  2. ZoomButtonsController zoomController =
  3.      mapView.getZoomButtonsController();
  4.      zoomController.setOnZoomListener(new OnZoomListener() {
  5.      public void onZoom(boolean zoomIn) {
  6.      if(zoomIn)
  7.      {
  8.      Log.v("update", "zoomIn "+mapView.getZoomLevel());
  9.      mapcontroller.zoomIn();
  10.      loadStatus();
  11.      }
  12.      else
  13.      {
  14.      Log.v("update", "zoomout "+mapView.getZoomLevel());
  15.      mapcontroller.zoomOut();
  16.      }
  17.      }
  18.      public void onVisibilityChanged(boolean visible) {
  19.      // if(!visible)
  20.      }
  21.      });