Interface BaseVectorLayer.HasDeclutter

All Known Subinterfaces:
BaseVectorLayer.HasBaseVectorLayerOptions
All Known Implementing Classes:
BaseHeatmapLayerOptions, BaseVectorLayerOptions, HeatmapLayerOptions, NoOpVectorLayer, VectorLayer, VectorLayerOptions
Enclosing class:
BaseVectorLayer<S extends AbstractVectorSource>

public static interface BaseVectorLayer.HasDeclutter
Interface to be implemented by layers that should provide "declutter" attribute management.

For more details see: BaseVectorLayer docs

  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    setDeclutter(Boolean declutter)
    Sets whether declutter images and texts.
  • Method Details

    • getDeclutter

      Boolean getDeclutter()
      Returns:
      whether declutter images and texts, null value means that default value is used: false
    • setDeclutter

      void setDeclutter(Boolean declutter)
      Sets whether declutter images and texts. Decluttering is applied to all image and text styles of all vector layers that have set this to true. The priority is defined by the z-index of the layer, the Style.withZIndex(Integer) of the style and the render order of features. Higher z-index means higher priority. Within the same z-index, a feature rendered before another has higher priority.

      As an optimization decluttered features from layers with the same Layer.setClassName(String) are rendered above the Fill and Stroke styles of all of those layers regardless of z-index. To opt out of this behavior and place declutterd features with their own layer configure the layer with a className other than 'ol-layer'.

      The default value is false.

      Note, declutter is set only at creation time and cannot be changed at runtime.

      For more details see: BaseVectorLayer docs

      Parameters:
      declutter - whether declutter images and texts