@ Override public void animateTo ( int x , int y ) { // If no layout, delay this call if ( ! mMapView . isLayoutOccurred ( ) ) { mReplayController . animateTo ( x , y ) ; return ; } if ( ! mMapView . isAnimating ( ) ) { mMapView . mIsFlinging = false ; final int xStart = ( int ) mMapView . getMapScrollX ( ) ; final int yStart = ( int ) mMapView . getMapScrollY ( ) ; final int dx = x - mMapView . getWidth ( ) / 2 ; final int dy = y - mMapView . getHeight ( ) / 2 ; if ( dx != xStart || dy != yStart ) { mMapView . getScroller ( ) . startScroll ( xStart , yStart , dx , dy , Configuration . getInstance ( ) . getAnimationSpeedDefault ( ) ) ; mMapView . postInvalidate ( ) ; } } }
Start animating the map towards the given point .