title: Place markers on map with timer
body: <p>I'm adding markers (around 200) as a path on map using google maps v2, and perfectly placed on map.
  but my requirement is to add each marker with some time interval so i wanted it to look like some animation. so i've tried two methods,
  First method is</p>
  
  <pre><code>latvalues[] = {....};
  longvalues[]={....};
  for(int i=0;i&lt;latvalues.length;i++){
     map.addMarker(new MarkerOptions().position(new LatLng(latvalues[i],longvalues[i])).title("Info")
                                          .icon(BitmapDescriptorFactory.fromResource(R.drawable.img)));
  Thread.sleep(500);
  }
  </code></pre>
  
  <p>this is not working, only after placing all markers, map is loading..</p>
  
  <p>Second method is</p>
  
  <pre><code> latvalues[] = {....};
  longvalues[]={....};
  Timer marktimer = new Timer();
  markTimer.scheduleAtFixedRate(new TimerTask() {
  
      @Override
      public void run() {
  
      for(int i=0;i&lt;latvalues.length;i++){
     map.addMarker(new MarkerOptions().position(new LatLng(latvalues[i],longvalues[i])).title("Info")
                                          .icon(BitmapDescriptorFactory.fromResource(R.drawable.img)));
      }
  }
  },0, 500);
  
  marktimer.cancel();
  </code></pre>
  
  <p>this is not even loading any markers also...</p>
  
  <p>Please suggest any workaround to achieve this...</p>
  
  <p>Edited code using Countdown timer:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.datemap);
  
      SupportMapFragment fm = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.busmap);
      map=fm.getMap();
      map.setMyLocationEnabled(true);
  
      countdown();
  }
  public void countdown(){
      if(this.ctimer != null){
          this.ctimer.cancel();
      }
      this.ctimer = new CountDownTimer(1000,500) {
  
          @Override
          public void onTick(long millisUntilFinished) {
              // TODO Auto-generated method stub
              if(markerno&lt;latitudeValues1.length){
                  map.addMarker(new MarkerOptions().position(new LatLng(latitudeValues1[markerno],longitudevalues1[markerno])).title("Info")
                          .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow)));
                  markerno++;
              }
          }
  
          @Override
          public void onFinish() {
              // TODO Auto-generated method stub
              map.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitudeValues1[markerno],longitudevalues1[markerno]), 12));
          }
      }.start();
  }
  </code></pre>