title: Android Map Overlay Issues
body: <p>Is there any way i can implement a zoom listener that can trigger events as soon as the zoom level changes. So far, i have managed with the onUserinteraction method manually checking for changing zoom-level.
  Another thing is i to want add/remove overlays dynamically. what i,ve done so far is in the onUserinteraction method, i call a function which adds the overlays dynamically, using mapOverlays.add() function and the addition actually does happen dynamically. But somehow mapOverlays.remove() function is not removing the overlays</p>
  
  <pre><code>     //Function for adding first set of markers
       public void setOverlay()
  {
      worldLength = World.length;
      mapOverlays = mapView.getOverlays();
      drawable0 = this.getResources().getDrawable(R.drawable.marker);
      itemizedOverlay0 = new MyItemizedOverlay(drawable0);
      for (int i = 0; i &lt; worldLength; i++)
      {
          itemizedOverlay0.addOverlay(World[i]);
      }
      mapOverlays.add(itemizedOverlay0);
      mapView.postInvalidate();
  }
       //Function for adding second set of markers
       public void setOverlay1() 
       {
        mapView.setStreetView(true);
        usaLength = USA.length;
        mexicoLength = Mexico.length;
                 mapOverlays = mapView.getOverlays();
          drawable1 = this.getResources().getDrawable(R.drawable.marker);
          itemizedOverlay1 = new MyItemizedOverlay(drawable1);
          itemizedOverlay2 = new MyItemizedOverlay(drawable1);
  
  
          for (int i = 0; i &lt; usaLength; i++) {
              itemizedOverlay1.addOverlay(USA[i]);
          }
          for (int i = 0; i &lt; mexicoLength; i++) {
              itemizedOverlay2.addOverlay(Mexico[i]);
          }
  
          mapOverlays.add(itemizedOverlay1);
          mapOverlays.add(itemizedOverlay2);
  
  
      mapView.postInvalidate();
  
  }
  
       public void onUserInteraction() {
     super.onUserInteraction();
     if(mapView.getZoomLevel()&gt;3)
     {
         mapOverlays.remove(itemizedOverlay0);
         setOverlay1();
                   //the above happens
     }
     else if(mapView.getZoomLevel()&lt;=3 &amp;&amp; mapOverlays.size()&gt;5)
     {
         mapOverlays.remove(itemizedOverlay1);
         mapOverlays.remove(itemizedOverlay2);
                   //the above doesn't
         setOverlay();   
     }
     else if(mapView.getZoomLevel()&lt;=3)
     {
  
     }
  }
  </code></pre>