Package 

Class GridBasedAlgorithm

  • All Implemented Interfaces:
    com.google.maps.android.clustering.algo.Algorithm

    
    public class GridBasedAlgorithm<T extends ClusterItem>
    extends AbstractAlgorithm<T>
                        

    Groups markers into a grid for clustering. This algorithm organizes items into a two-dimensional grid, facilitating the formation of clusters based on proximity within each grid cell. The grid size determines the spatial granularity of clustering, and clusters are created by aggregating items within the same grid cell.

    The effectiveness of clustering is influenced by the specified grid size, which determines the spatial resolution of the grid. Smaller grid sizes result in more localized clusters, whereas larger grid sizes lead to broader clusters covering larger areas.