/**
  * Animates a markerWithPosition some time in the future, and removes it when the animation is
  * complete.
  *
  * @param marker the markerWithPosition to animate.
  * @param from the position to animate from.
  * @param to the position to animate to.
  */
 public void animateThenRemove(MarkerWithPosition marker, LatLng from, LatLng to) {
   lock.lock();
   AnimationTask animationTask = new AnimationTask(marker, from, to);
   animationTask.removeOnAnimationComplete(mClusterManager.getMarkerManager());
   mAnimationTasks.add(animationTask);
   lock.unlock();
 }
 public void InitializeTimerAndTask() {
   if (_animationTask != null) {
     _animationTask.cancel();
   }
   if (_animationTimer != null) {
     _animationTimer.cancel();
   }
   _animationTask = null;
   _animationTimer = null;
 }