googlemaps/android-maps-utils

**DefaultClusterRenderer** -- Add the functionality to change the animation duration for marker splitting/merging effects

vorokami opened this issue ยท 1 comments

In googlemaps/google-maps-ios-utils we have functionality to change this value by using not private variable animationDuration into google-maps-ios-utils/src/Clustering/View/GMUDefaultClusterRenderer.h. It will be great if we have this functionality for android too.

Example of using this variable in iOS:

    guard let mapView = self.mapView else { return }
    let iconGenerator = CustomClusterIconGenerator()
    let renderer = CustomRendererMarkers(mapView: mapView, clusterIconGenerator: iconGenerator)
    renderer.animatesClusters = self.isAnimateClustering
    renderer.animationDuration = self.durationOfClusteringAnimation
    renderer.delegate = self;
    renderer.zIndex = 10;
    // initWithClusterDistancePoints
    let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm(clusterDistancePoints: self.maxDistanceBetweenClusteredItems)
    self.mClusterManager = GMUClusterManager(map: mapView, algorithm: algorithm as! GMUClusterAlgorithm, renderer: renderer)`

Example of possible using this variable in Android:

    OwnIconRenderer ownIconRenderer = new OwnIconRenderer(
            this.context, this.activity, this.googleMap, mClusterManager);
    mClusterManager.setRenderer(ownIconRenderer);
    mClusterManager.getRenderer().setAnimation(this.isAnimateClustering);
    mClusterManager.getRenderer().setAnimationDuration(this.durationOfClusteringAnimation);`

๐ŸŽ‰ This issue has been resolved in version 2.4.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€