java.lang.Object
com.esri.arcgisruntime.layers.WmsSublayer
- All Implemented Interfaces:
- LayerContent
Represents a sublayer of a WmsLayer, providing data necessary for building a Table of Contents. Only named WMS 
 sublayers have an associated WmsSublayer. A list of WmsSublayers can be obtained by calling 
 
WmsLayer.getSublayers() on a loaded WmsLayer.- Since:
- 100.2.0
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionbooleanChecks whether we can change the visibility of this layer.booleanChecks if this layer will be listed in the legend.Asynchronously fetches a list of legend information for this layer, if any.Gets the name of the current style of this sublayer.getName()Gets the name of this layer.Returns a list of sub layers, if any.Gets metadata for this sublayer.booleanChecks if this layer is visible or not.booleanisVisibleAtScale(double scale) Checks if this layer has effective visibility at the given scale.voidsetCanShowInLegend(boolean canShowInLegend) Sets whether or not this layer should be visible in the legend.voidsetCurrentStyle(String styleName) Sets the name of the style for this sublayer to use.voidsetVisible(boolean visible) Sets the layer's visibility ifLayerContent.canChangeVisibility()returns true.
- 
Method Details- 
setCurrentStyleSets the name of the style for this sublayer to use.- Parameters:
- styleName- the name of the style to use, or an empty string to use the default style
- Throws:
- IllegalArgumentException- if styleName is null
- Since:
- 100.3.0
 
- 
getCurrentStyleGets the name of the current style of this sublayer.- Returns:
- the name of the current style; an empty string indicates the default style is being used
- Since:
- 100.2.0
 
- 
getSublayerInfoGets metadata for this sublayer.- Returns:
- the metadata
- Since:
- 100.2.0
 
- 
canChangeVisibilitypublic boolean canChangeVisibility()Description copied from interface:LayerContentChecks whether we can change the visibility of this layer.- Specified by:
- canChangeVisibilityin interface- LayerContent
- Returns:
- true if we can change this layer's visibility; false otherwise
 
- 
isVisiblepublic boolean isVisible()Description copied from interface:LayerContentChecks if this layer is visible or not.- Specified by:
- isVisiblein interface- LayerContent
- Returns:
- true if the layer is visible; false otherwise
- See Also:
 
- 
setVisiblepublic void setVisible(boolean visible) Description copied from interface:LayerContentSets the layer's visibility ifLayerContent.canChangeVisibility()returns true.- Specified by:
- setVisiblein interface- LayerContent
- Parameters:
- visible- true to make the layer visible; false to hide it
- See Also:
 
- 
isVisibleAtScalepublic boolean isVisibleAtScale(double scale) Description copied from interface:LayerContentChecks 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.- Specified by:
- isVisibleAtScalein interface- LayerContent
- 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
 
- 
getNameDescription copied from interface:LayerContentGets the name of this layer.- Specified by:
- getNamein interface- LayerContent
- Returns:
- name of this layer
 
- 
canShowInLegendpublic boolean canShowInLegend()Description copied from interface:LayerContentChecks if this layer will be listed in the legend.- Specified by:
- canShowInLegendin interface- LayerContent
- Returns:
- true if this layer will be visible in the legend; false otherwise
 
- 
setCanShowInLegendpublic void setCanShowInLegend(boolean canShowInLegend) Description copied from interface:LayerContentSets whether or not this layer should be visible in the legend.- Specified by:
- setCanShowInLegendin interface- LayerContent
- Parameters:
- canShowInLegend- true to show in the legend; false to omit it from the legend
 
- 
getSubLayerContentsDescription copied from interface:LayerContentReturns 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.- Specified by:
- getSubLayerContentsin interface- LayerContent
- Returns:
- a read only list of sub-layers, if any
 
- 
fetchLegendInfosAsyncDescription copied from interface:LayerContentAsynchronously fetches a list of legend information for this layer, if any.- Specified by:
- fetchLegendInfosAsyncin interface- LayerContent
- Returns:
- a listenable future that can be used to get the legend information. Null is returned if an error occurs.
 
 
-