Interface LayerContent

    • Method Detail

      • canChangeVisibility

        boolean canChangeVisibility()
        Checks whether we can change the visibility of this layer.
        Returns:
        true if we can change this layer's visibility; false otherwise
        Since:
        100.0.0
      • isVisible

        boolean isVisible()
        Checks if this layer is visible or not.
        Returns:
        true if the layer is visible; false otherwise
        Since:
        100.0.0
        See Also:
        setVisible(boolean)
      • setVisible

        void setVisible​(boolean isVisible)
        Sets the layer's visibility if canChangeVisibility() returns true.
        Parameters:
        isVisible - true to make the layer visible; false to hide it
        Since:
        100.0.0
        See Also:
        isVisible()
      • canShowInLegend

        boolean canShowInLegend()
        Checks if this layer will be listed in the legend.
        Returns:
        true if this layer will be visible in the legend; false otherwise
        Since:
        100.0.0
      • setCanShowInLegend

        void setCanShowInLegend​(boolean canShowInLegend)
        Sets whether or not this layer should be visible in the legend.
        Parameters:
        canShowInLegend - true to show in the legend; false to omit it from the legend
        Since:
        100.0.0
      • getName

        java.lang.String getName()
        Gets the name of this layer.
        Returns:
        name of this layer
        Since:
        100.0.0
      • getSubLayerContents

        ListenableList<LayerContent> getSubLayerContents()
        Returns a list of sub layers, if any. If there are no sub-layers, an empty list will be returned. This list cannot be used to add or remove sub-layers.
        Returns:
        a read only list of sub-layers, if any
        Since:
        100.0.0
      • fetchLegendInfosAsync

        ListenableFuture<java.util.List<LegendInfo>> fetchLegendInfosAsync()
        Asynchronously fetches a list of legend information for this layer, if any.
        Returns:
        a listenable future that can be used to get the legend information. Null is returned if an error occurs.
        Since:
        100.0.0
      • isVisibleAtScale

        boolean isVisibleAtScale​(double scale)
        Checks if this layer has effective visibility at the given scale. This effective visibility takes care of the effective visibility of the parents at the specified scale.
        Parameters:
        scale - the scale the visibility has to be calculated for
        Returns:
        true if the layer will be visible at the given scale; false otherwise
        Since:
        100.0.0