Class ClusterElementBuilder

java.lang.Object
com.massifmaps.layers.ClusterElementBuilder

public class ClusterElementBuilder extends Object
A special callback interface for building cluster elements from set of existing vector element.
  • Constructor Details

    • ClusterElementBuilder

      public ClusterElementBuilder()
  • Method Details

    • getBuilderMode

      public int getBuilderMode()
      Returns the builder mode. The return value of this method determines which builder method is called.
      Returns:
      The builder mode that determines which buildClusterElement method is called.
    • buildClusterElement

      public VectorElement buildClusterElement(MapPos mapPos, int elementCount)
      A callback for building a new cluster element given position and the number of cluster element.
      Parameters:
      mapPos - The position of the cluster element.
      elementCount - The number of elements in the cluster.
      Returns:
      The created cluster element.
    • buildClusterElement

      public VectorElement buildClusterElement(MapPos mapPos, VectorElementVector elements)
      A callback for building a new cluster element given position and list of vector elements.
      Parameters:
      mapPos - The position of the cluster element.
      elements - The list of elements that defines the cluster.
      Returns:
      The created cluster element.