title: Animate or Move marker along with rout path on GoogleMap
body: <p>First time i am working with google maps and i am stuck in very critical situation. 
  Actually i want to animate marker along with poly line(rout drawn), in this regard i have been attempted many codes but not single one approach is going to fire. </p>
  
  <p>What approach i am using that is first time i draw a rout b/w rider and user destinations, After Ward as the lat long of rider is changes i push his lat long to firebase. Meanwhile i am getting the update lat long of rider to user side in map and then rout draw.</p>
  
  <p><a href="https://i.stack.imgur.com/tGnyQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tGnyQ.png" alt="enter image description here"></a></p>
  
  <p>For your better understanding here is my code.</p>
  
  <p>Here is how i draw path b/w rider and user...</p>
  
  <pre><code>public void pathDraw(String startLat,String startLon,String endLat,String endLon,int orginDrawable, int desTinationDrawable){
  
      LatLng origin = new LatLng(Double.parseDouble(startLat), Double.parseDouble(startLon));
      LatLng destination = new LatLng(Double.parseDouble(endLat), Double.parseDouble(endLon));
      DrawRouteMaps.getInstance(this)
              .draw(origin, destination, mGoogleMap);
      DrawMarker.getInstance(this).draw(mGoogleMap, origin,orginDrawable, "Origin Location");
      DrawMarker.getInstance(this).draw(mGoogleMap, destination, desTinationDrawable, "Destination Location");
      LatLngBounds bounds = new LatLngBounds.Builder()
              .include(origin)
              .include(destination).build();
      Point displaySize = new Point();
      getWindowManager().getDefaultDisplay().getSize(displaySize);
      mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, displaySize.x, 1000, 15));
  }
  </code></pre>
  
  <p>And here is the Firebase method cal every time when lat long update.</p>
  
  <pre><code>  public void mapChangeAnimation(final boolean user){
      mDatebaseTracking.keepSynced(true);
      DatabaseReference query = mDatebaseTracking.child(order_id);
  
      query.addValueEventListener(new ValueEventListener() {
          @Override
          public void onDataChange(DataSnapshot dataSnapshot) {
              rider_lat = ""+dataSnapshot.child("rider_lat").getValue();
              rider_long = ""+dataSnapshot.child("rider_long").getValue();
              String latlong = rider_lat + " "+ rider_long;
  
              if(!user) {
                  LatLng latLngBegin = new LatLng(Double.parseDouble(rider_lat),Double.parseDouble(rider_long));
                  LatLng latLngEnd = new LatLng(Double.parseDouble(rest_lat),Double.parseDouble(rest_long));   
              }
              else {
                  LatLng latLngBegin = new LatLng(Double.parseDouble(rider_lat),Double.parseDouble(rider_long));
                  LatLng latLngEnd = new LatLng(Double.parseDouble(user_lat),Double.parseDouble(user_long));                  
              }
          }
  
          @Override
          public void onCancelled(DatabaseError databaseError) {
          }
      });
  }
  </code></pre>
  
  <p>You suggestion will be appreciated. Also if you please post a code according to my scenario.
  Thanks in advance</p>