@@ -111,7 +111,7 @@ public void setAnimationType(AnimationType type) {
111111 case EASE_IN , ACCELERATE :
112112 animationInterp = new AccelerateInterpolator ();
113113 break ;
114- case EASE_OUT :
114+ case EASE_OUT , DECELERATE :
115115 animationInterp = new DecelerateInterpolator ();
116116 break ;
117117 case EASE_IN_OUT :
@@ -123,9 +123,6 @@ public void setAnimationType(AnimationType type) {
123123 case BOUNCE :
124124 animationInterp = new BounceInterpolator ();
125125 break ;
126- case DECELERATE :
127- animationInterp = new DecelerateInterpolator ();
128- break ;
129126 default :
130127 animationInterp = new LinearInterpolator ();
131128 break ;
@@ -180,7 +177,7 @@ public void setAnimationType(AnimationType type) {
180177 public ClusterRendererMultipleItems (Context context , GoogleMap map , ClusterManager <T > clusterManager ) {
181178 mMap = map ;
182179 mAnimate = true ;
183- mAnimationDurationMs = 300 ;
180+ mAnimationDurationMs = 5000 ;
184181 mDensity = context .getResources ().getDisplayMetrics ().density ;
185182 mIconGenerator = new IconGenerator (context );
186183 mIconGenerator .setContentView (makeSquareTextView (context ));
@@ -535,8 +532,7 @@ public void run() {
535532 final Point point = mSphericalMercatorProjection .toPoint (marker .position );
536533 final Point closest = findClosestCluster (newClustersOnScreen , point );
537534 if (closest != null ) {
538- LatLng animateTo = mSphericalMercatorProjection .toLatLng (closest );
539- markerModifier .animateThenRemove (marker , marker .position , animateTo );
535+ markerModifier .remove (true , marker .marker );
540536 RendererLogger .d ("ClusterRenderer" , "Animating then removing marker at position: " + marker .position );
541537 } else if (mClusterMarkerCache .mCache .keySet ().iterator ().hasNext () && mClusterMarkerCache .mCache .keySet ().iterator ().next ().getItems ().contains (marker .clusterItem )) {
542538 T foundItem = null ;
@@ -1146,7 +1142,7 @@ private void perform(MarkerModifier markerModifier) {
11461142 if (animateFrom != null ) {
11471143 markerModifier .animate (markerWithPosition , animateFrom , item .getPosition ());
11481144 RendererLogger .d ("ClusterRenderer" , "Animating marker from " + animateFrom + " to " + item .getPosition ());
1149- } else if ( currentLocation != null ) {
1145+ } else {
11501146 markerModifier .animate (markerWithPosition , currentLocation , item .getPosition ());
11511147 RendererLogger .d ("ClusterRenderer" , "Animating marker from " + currentLocation + " to " + item .getPosition ());
11521148 }
0 commit comments