java.lang.Object
org.vaadin.addons.componentfactory.leaflet.plugins.markercluster.MarkerClusterOptions
All Implemented Interfaces:
Serializable

public class MarkerClusterOptions extends Object implements Serializable
Possible MarkerClusterGroup options
  • minOpacity -
*
Since:
2020-05-25
Version:
1.0
Author:
Gabor Kokeny Email: kokeny19@gmail.com
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the delay, in milliseconds, between processing consecutive chunks when chunked loading is enabled.
    int
    Gets the maximum time, in milliseconds, spent processing markers in a single chunk before yielding to the browser.
    Gets the name of the map pane in which the cluster icons are placed.
    Gets the zoom level at and beyond which clustering is disabled, or null if clustering is always enabled.
    int
    Gets the maximum radius, in pixels, that a cluster will cover from the central marker.
    Gets the path options used to style the coverage polygon shown when a cluster is hovered.
    double
    Gets the multiplier applied to the distance between markers when a cluster is spiderfied.
    Gets the path options used to style the leg lines drawn to each marker when a cluster is spiderfied.
    boolean
    Returns whether cluster splitting and merging is animated on zoom.
    boolean
    Returns whether markers added after the initial batch are animated into their clusters.
    boolean
    Returns whether markers are added in chunks to keep the UI responsive when loading large numbers of markers.
    boolean
    Returns whether clusters and markers that fall outside the visible map bounds are removed from the DOM for performance.
    boolean
    Returns whether the bounds of the markers contained in a cluster are shown as a polygon when the cluster is hovered.
    boolean
    Returns whether single markers are wrapped in a cluster icon rather than shown as a plain marker.
    boolean
    Returns whether clicking a cluster at the bottom zoom level spiderfies it so all of its markers become visible.
    boolean
    Returns whether clicking a cluster zooms the map to the bounds of its markers.
    void
    setAnimate(boolean animate)
    Sets whether cluster splitting and merging is animated on zoom.
    void
    setAnimateAddingMarkers(boolean animateAddingMarkers)
    Sets whether markers added after the initial batch are animated into their clusters.
    void
    setChunkDelay(int chunkDelay)
    Sets the delay, in milliseconds, between processing consecutive chunks when chunked loading is enabled.
    void
    setChunkedLoading(boolean chunkedLoading)
    Sets whether markers are added in chunks to keep the UI responsive when loading large numbers of markers.
    void
    setChunkInterval(int chunkInterval)
    Sets the maximum time, in milliseconds, spent processing markers in a single chunk before yielding to the browser.
    void
    setClusterPane(String clusterPane)
    Sets the name of the map pane in which the cluster icons are placed.
    void
    setDisableClusteringAtZoom(Integer disableClusteringAtZoom)
    Sets the zoom level at and beyond which markers are no longer clustered.
    void
    setMaxClusterRadius(int maxClusterRadius)
    Sets the maximum radius, in pixels, that a cluster will cover from the central marker.
    void
    Sets the path options used to style the coverage polygon shown when a cluster is hovered.
    void
    setRemoveOutsideVisibleBounds(boolean removeOutsideVisibleBounds)
    Sets whether clusters and markers that fall outside the visible map bounds are removed from the DOM for performance.
    void
    setShowCoverageOnHover(boolean showCoverageOnHover)
    Sets whether the bounds of the markers contained in a cluster are shown as a polygon when the cluster is hovered.
    void
    setSingleMarkerMode(boolean singleMarkerMode)
    Sets whether single markers are wrapped in a cluster icon rather than shown as a plain marker.
    void
    setSpiderfyDistanceMultiplier(double spiderfyDistanceMultiplier)
    Sets the multiplier applied to the distance between markers when a cluster is spiderfied.
    void
    setSpiderfyOnMaxZoom(boolean spiderfyOnMaxZoom)
    Sets whether clicking a cluster at the bottom zoom level spiderfies it so all of its markers become visible.
    void
    setSpiderLegPolylineOptions(PathOptions spiderLegPolylineOptions)
    Sets the path options used to style the leg lines drawn to each marker when a cluster is spiderfied.
    void
    setZoomToBoundsOnClick(boolean zoomToBoundsOnClick)
    Sets whether clicking a cluster zooms the map to the bounds of its markers.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MarkerClusterOptions

      public MarkerClusterOptions()
  • Method Details

    • getMaxClusterRadius

      public int getMaxClusterRadius()
      Gets the maximum radius, in pixels, that a cluster will cover from the central marker.
      Returns:
      the maximum cluster radius in pixels
    • setMaxClusterRadius

      public void setMaxClusterRadius(int maxClusterRadius)
      Sets the maximum radius, in pixels, that a cluster will cover from the central marker. A smaller value produces more, smaller clusters.
      Parameters:
      maxClusterRadius - the maximum cluster radius in pixels
    • getClusterPane

      public String getClusterPane()
      Gets the name of the map pane in which the cluster icons are placed.
      Returns:
      the cluster pane name
    • setClusterPane

      public void setClusterPane(String clusterPane)
      Sets the name of the map pane in which the cluster icons are placed.
      Parameters:
      clusterPane - the cluster pane name
    • isSpiderfyOnMaxZoom

      public boolean isSpiderfyOnMaxZoom()
      Returns whether clicking a cluster at the bottom zoom level spiderfies it so all of its markers become visible.
      Returns:
      true if the cluster spiderfies at the maximum zoom level
    • setSpiderfyOnMaxZoom

      public void setSpiderfyOnMaxZoom(boolean spiderfyOnMaxZoom)
      Sets whether clicking a cluster at the bottom zoom level spiderfies it so all of its markers become visible.
      Parameters:
      spiderfyOnMaxZoom - true to spiderfy at the maximum zoom level
    • isShowCoverageOnHover

      public boolean isShowCoverageOnHover()
      Returns whether the bounds of the markers contained in a cluster are shown as a polygon when the cluster is hovered.
      Returns:
      true if the cluster coverage polygon is shown on hover
    • setShowCoverageOnHover

      public void setShowCoverageOnHover(boolean showCoverageOnHover)
      Sets whether the bounds of the markers contained in a cluster are shown as a polygon when the cluster is hovered.
      Parameters:
      showCoverageOnHover - true to show the coverage polygon on hover
    • isZoomToBoundsOnClick

      public boolean isZoomToBoundsOnClick()
      Returns whether clicking a cluster zooms the map to the bounds of its markers.
      Returns:
      true if clicking a cluster zooms to its bounds
    • setZoomToBoundsOnClick

      public void setZoomToBoundsOnClick(boolean zoomToBoundsOnClick)
      Sets whether clicking a cluster zooms the map to the bounds of its markers.
      Parameters:
      zoomToBoundsOnClick - true to zoom to the cluster bounds on click
    • isSingleMarkerMode

      public boolean isSingleMarkerMode()
      Returns whether single markers are wrapped in a cluster icon rather than shown as a plain marker.
      Returns:
      true if single marker mode is enabled
    • setSingleMarkerMode

      public void setSingleMarkerMode(boolean singleMarkerMode)
      Sets whether single markers are wrapped in a cluster icon rather than shown as a plain marker.
      Parameters:
      singleMarkerMode - true to enable single marker mode
    • getDisableClusteringAtZoom

      public Integer getDisableClusteringAtZoom()
      Gets the zoom level at and beyond which clustering is disabled, or null if clustering is always enabled.
      Returns:
      the zoom level at which clustering is disabled, or null
    • setDisableClusteringAtZoom

      public void setDisableClusteringAtZoom(Integer disableClusteringAtZoom)
      Sets the zoom level at and beyond which markers are no longer clustered. Use null to keep clustering enabled at every zoom level.
      Parameters:
      disableClusteringAtZoom - the zoom level at which to disable clustering, or null to always cluster
    • isRemoveOutsideVisibleBounds

      public boolean isRemoveOutsideVisibleBounds()
      Returns whether clusters and markers that fall outside the visible map bounds are removed from the DOM for performance.
      Returns:
      true if markers outside the visible bounds are removed
    • setRemoveOutsideVisibleBounds

      public void setRemoveOutsideVisibleBounds(boolean removeOutsideVisibleBounds)
      Sets whether clusters and markers that fall outside the visible map bounds are removed from the DOM for performance.
      Parameters:
      removeOutsideVisibleBounds - true to remove markers outside the visible bounds
    • isAnimate

      public boolean isAnimate()
      Returns whether cluster splitting and merging is animated on zoom.
      Returns:
      true if clustering animations are enabled
    • setAnimate

      public void setAnimate(boolean animate)
      Sets whether cluster splitting and merging is animated on zoom.
      Parameters:
      animate - true to enable clustering animations
    • isAnimateAddingMarkers

      public boolean isAnimateAddingMarkers()
      Returns whether markers added after the initial batch are animated into their clusters.
      Returns:
      true if adding markers is animated
    • setAnimateAddingMarkers

      public void setAnimateAddingMarkers(boolean animateAddingMarkers)
      Sets whether markers added after the initial batch are animated into their clusters.
      Parameters:
      animateAddingMarkers - true to animate markers as they are added
    • getSpiderfyDistanceMultiplier

      public double getSpiderfyDistanceMultiplier()
      Gets the multiplier applied to the distance between markers when a cluster is spiderfied.
      Returns:
      the spiderfy distance multiplier
    • setSpiderfyDistanceMultiplier

      public void setSpiderfyDistanceMultiplier(double spiderfyDistanceMultiplier)
      Sets the multiplier applied to the distance between markers when a cluster is spiderfied. Increase it to spread the markers further apart.
      Parameters:
      spiderfyDistanceMultiplier - the spiderfy distance multiplier
    • getSpiderLegPolylineOptions

      public PathOptions getSpiderLegPolylineOptions()
      Gets the path options used to style the leg lines drawn to each marker when a cluster is spiderfied.
      Returns:
      the spider leg polyline options
    • setSpiderLegPolylineOptions

      public void setSpiderLegPolylineOptions(PathOptions spiderLegPolylineOptions)
      Sets the path options used to style the leg lines drawn to each marker when a cluster is spiderfied.
      Parameters:
      spiderLegPolylineOptions - the spider leg polyline options
    • isChunkedLoading

      public boolean isChunkedLoading()
      Returns whether markers are added in chunks to keep the UI responsive when loading large numbers of markers.
      Returns:
      true if chunked loading is enabled
    • setChunkedLoading

      public void setChunkedLoading(boolean chunkedLoading)
      Sets whether markers are added in chunks to keep the UI responsive when loading large numbers of markers.
      Parameters:
      chunkedLoading - true to enable chunked loading
    • getChunkInterval

      public int getChunkInterval()
      Gets the maximum time, in milliseconds, spent processing markers in a single chunk before yielding to the browser.
      Returns:
      the chunk processing interval in milliseconds
    • setChunkInterval

      public void setChunkInterval(int chunkInterval)
      Sets the maximum time, in milliseconds, spent processing markers in a single chunk before yielding to the browser.
      Parameters:
      chunkInterval - the chunk processing interval in milliseconds
    • getChunkDelay

      public int getChunkDelay()
      Gets the delay, in milliseconds, between processing consecutive chunks when chunked loading is enabled.
      Returns:
      the delay between chunks in milliseconds
    • setChunkDelay

      public void setChunkDelay(int chunkDelay)
      Sets the delay, in milliseconds, between processing consecutive chunks when chunked loading is enabled.
      Parameters:
      chunkDelay - the delay between chunks in milliseconds
    • getPolygonOptions

      public PathOptions getPolygonOptions()
      Gets the path options used to style the coverage polygon shown when a cluster is hovered.
      Returns:
      the coverage polygon options
    • setPolygonOptions

      public void setPolygonOptions(PathOptions polygonOptions)
      Sets the path options used to style the coverage polygon shown when a cluster is hovered.
      Parameters:
      polygonOptions - the coverage polygon options