Class BaseLayerOptions

java.lang.Object
io.jmix.mapsflowui.kit.component.model.layer.option.BaseLayerOptions
All Implemented Interfaces:
HasBaseLayerOptions
Direct Known Subclasses:
BaseImageLayerOptions, BaseTileLayerOptions, BaseVectorLayerOptions

public abstract class BaseLayerOptions extends Object implements HasBaseLayerOptions
Abstract implementation of options for each layer.

For more details see: Layer docs

See Also:
  • Field Details

    • className

      protected String className
    • opacity

      protected Double opacity
    • visible

      protected Boolean visible
    • extent

      protected Extent extent
    • zIndex

      protected Integer zIndex
    • minZoom

      protected Double minZoom
    • maxZoom

      protected Double maxZoom
  • Constructor Details

    • BaseLayerOptions

      public BaseLayerOptions()
  • Method Details

    • getClassName

      public String getClassName()
      Specified by:
      getClassName in interface HasBaseLayerOptions
      Returns:
      a CSS class name that should be used by the layer element, null value means that default value is used: 'ol-layer'
    • setClassName

      public void setClassName(String className)
      Description copied from interface: HasBaseLayerOptions
      Set a CSS class name to the layer element. The default value 'ol-layer'.

      Note, CSS class name is set only at creation time and cannot be changed at runtime.

      For more details see: Layer docs

      Specified by:
      setClassName in interface HasBaseLayerOptions
      Parameters:
      className - CSS class name
    • getOpacity

      public Double getOpacity()
      Specified by:
      getOpacity in interface HasBaseLayerOptions
      Returns:
      the opacity of the layer. null value means that default value is used: '1'
    • setOpacity

      public void setOpacity(Double opacity)
      Description copied from interface: HasBaseLayerOptions
      Sets the opacity of the layer, allowed values range from 0 to 1. The default value is '1'.

      For more details see: setOpacity() docs

      Specified by:
      setOpacity in interface HasBaseLayerOptions
      Parameters:
      opacity - opacity of the layer
    • getVisible

      public Boolean getVisible()
      Specified by:
      getVisible in interface HasBaseLayerOptions
      Returns:
      the visibility of the layer. null value means that default value is used: 'true'
    • setVisible

      public void setVisible(Boolean visible)
      Description copied from interface: HasBaseLayerOptions
      Set the visibility of the layer. The default value is true.

      For more details see: setVisible() docs

      Specified by:
      setVisible in interface HasBaseLayerOptions
      Parameters:
      visible - whether layer should be visible
    • getExtent

      public Extent getExtent()
      Specified by:
      getExtent in interface HasBaseLayerOptions
      Returns:
      the bounding extent for layer rendering or null if not set
    • setExtent

      public void setExtent(Extent extent)
      Description copied from interface: HasBaseLayerOptions
      Sets the bounding extent for layer rendering. The layer will not be rendered outside of this extent. If not set, the layer will be visible at all extents.

      For more details see: setExtent() docs

      Specified by:
      setExtent in interface HasBaseLayerOptions
      Parameters:
      extent - extent at which the layer is visible
    • getZIndex

      public Integer getZIndex()
      Specified by:
      getZIndex in interface HasBaseLayerOptions
      Returns:
      z-index for layer rendering or null if not set
    • setZIndex

      public void setZIndex(Integer zIndex)
      Description copied from interface: HasBaseLayerOptions
      Sets the z-index for layer rendering.

      At rendering time, the layers will be ordered, first by Z-index and then by position. The default value is 0.

      For more details see: setZIndex() docs

      Specified by:
      setZIndex in interface HasBaseLayerOptions
      Parameters:
      zIndex - z-index for layer rendering
    • getMinZoom

      public Double getMinZoom()
      Specified by:
      getMinZoom in interface HasBaseLayerOptions
      Returns:
      the minimum view zoom level (exclusive) above which layer will be visible or null if not set
    • setMinZoom

      public void setMinZoom(Double minZoom)
      Description copied from interface: HasBaseLayerOptions
      Sets the minimum view zoom level (exclusive) above which layer will be visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.

      For more details see: setMinZoom() docs

      Specified by:
      setMinZoom in interface HasBaseLayerOptions
      Parameters:
      minZoom - zoom level (exclusive) above which layer will be visible
    • getMaxZoom

      public Double getMaxZoom()
      Specified by:
      getMaxZoom in interface HasBaseLayerOptions
      Returns:
      the maximum view zoom level (inclusive) at which layer will be visible or null if not set
    • setMaxZoom

      public void setMaxZoom(Double maxZoom)
      Description copied from interface: HasBaseLayerOptions
      Sets the maximum view zoom level (inclusive) at which layer will be visible. Note that the zoom levels for layer visibility are based on the view zoom level, which may be different from a tile source zoom level.

      For more details see: setMaxZoom() docs

      Specified by:
      setMaxZoom in interface HasBaseLayerOptions
      Parameters:
      maxZoom - zoom level (inclusive) at which layer will be visible