title: How to control pinch zoom in, zoom out on a map in Android?
body: <p>In my Android app I've a MapActivity where, when zooming the map with two fingers (pinch) it's zooming, but when I lift the fingers it's zooming further. Meaning, if London is centered on the map, when I am zooming London reaches the edges of the screen; when I lift the fingers, it is going out of screen, zooming further. I want it like iOS map app (No further zooming). How can I do this?</p>
  
  <p>I tried the following code but did not work.</p>
  
  <pre><code>class MapOvelay extends Overlay {
     boolean moveTouch;
     int i;
  
      @Override
      public boolean onTouchEvent(MotionEvent event, MapView mapView) {
         switch (event.getAction()) {     
           case MotionEvent.ACTION_POINTER_UP://when two fingers are lifted
             mapController.setZoom(i);
             i=0;
             break;
  
           case MotionEvent.ACTION_MOVE://when two fingers are moving on map
             i = mapView.getZoomLevel();
             moveTouch = true;
             break;
     .... 
    }
   }
  }
  </code></pre>