Class Layer

    • Constructor Detail

      • Layer

        public Layer()
    • Method Detail

      • getOpacity

        public float getOpacity()
        Returns:
        opacity of the layer
      • setOpacity

        public void setOpacity​(float opacity)
        Sets the opacity of the layer. The value must lie between 0 and 1. Default value is 1.
        Parameters:
        opacity - new opacity of the layer
      • isVisible

        public boolean isVisible()
        Returns:
        whether the layer is visible or not
      • setVisible

        public void setVisible​(boolean visible)
        Sets the visibility of the layer. Default value is true.
        Parameters:
        visible - new visibility of the layer
      • getzIndex

        public Integer getzIndex()
        Returns:
        the z-index of the layer, or null if not defined
      • setzIndex

        public void setzIndex​(Integer zIndex)
        Sets the z-index of the layer. This allows to control in which order layers are rendered. Layers with higher z-indexes are rendered above layers with lower z-indexes. This value is null by default, which means the order of the layers in the map determines the rendering order.
        Parameters:
        zIndex - the new z-index, or null to remove the z-index
      • getMinZoom

        public Float getMinZoom()
        Returns:
        the minimum zoom level at which this layer will be visible, or null if not defined
      • setMinZoom

        public void setMinZoom​(Float minZoom)
        Sets the minimum zoom level at which this layer will be visible.
        Parameters:
        minZoom - the new minimum zoom level, or null to remove it
      • getMaxZoom

        public Float getMaxZoom()
        Returns:
        the maximum zoom level at which this layer will be visible, or null if not defined
      • setMaxZoom

        public void setMaxZoom​(Float maxZoom)
        Sets the maximum zoom level at which this layer will be visible.
        Parameters:
        maxZoom - the new maximum zoom level, or null to remove it
      • getBackground

        public String getBackground()
        Returns:
        the background color of the layer as CSS color string, or null if not defined
      • setBackground

        public void setBackground​(String background)
        Sets the background color of the layer as CSS color string. All valid CSS colors are supported, for example "black" or "rgb(0,0,0)".
        Parameters:
        background - the new background color of the layer, or null to remove it