WmsLayer

Displays data from a WMS service. The service may be hosted in the cloud on ArcGIS Online, on a third party server, or on-premises with ArcGIS Server.

Web Map Service (WMS) is an Open Geospatial Consortium (OGC) standard for delivering map images from an online service. WMS layer displays data from a web service that provides maps in the form of server-rendered images. This API supports WMS versions 1.1.0, 1.1.1, and 1.3.0. The service may be hosted in the cloud on ArcGIS Online, on a third party server, or on-premises ArcGIS Server.

Functional characteristics A WMS service can contain multiple layers in a hierarchy. A Wms layer can be constructed directly with a URL to a service and the uniquely identifying name of the desired layer. Alternatively, a WmsService can be used to programmatically explore the available layers and allow the user to choose layers at run time.

The maps provided by a WMS service use predefined symbology defined by the server. As a result, it is not possible to apply custom renderers or to visualize feature selection. WMS layers can have multiple style options. Your app can choose from the available styles.

Some layers can be marked as opaque, which means that they cover most of the map area and are good candidates for use as a basemap.

WMS layers support identify and time. They do not support selection or query. Note that due to the nature of WMS, it is not possible to retrieve feature geometry from WMS identify results. WMS layers support custom parameters, which can be specified for the service or an individual layer.

Performance characteristics WMS servers render map images on demand, which can require more server resources than a similar tiled service. WMS requires a service connection at all times.

Since

200.1.0

See also

Constructors

Link copied to clipboard
fun WmsLayer(item: Item)

Creates a WMS layer object from an item.

Link copied to clipboard
fun WmsLayer(layerInfos: Iterable<WmsLayerInfo>)

Creates a WmsLayer from the specified set of WmsLayerInfo objects. Use this method to create a WmsLayer when you have a set of WmsLayerInfo objects to include in the layer.

Link copied to clipboard
fun WmsLayer(url: String, layerNames: Iterable<String>)

Creates a WmsLayer with known URL and layer names. Use this method to create a WMS layer. To specify a preferred WMS version, set the 'VERSION' parameter in the 'GetCapabilities' URL for the service.

Properties

Link copied to clipboard

These parameters are appended to GetMap and GetFeatureInfo requests. If a parameter with the same name is defined in the service's custom parameters, then layer-specific values take precedence over service-wide values. WmsLayer CustomParameters property will take precedence over CustomParameters property on WmsService.

Link copied to clipboard

The WMS Layer's set of WmsLayerInfo objects. WmsLayerInfo objects describe the layers (as provided by the service). Multiple layers from a WmsService may be included in a single WmsLayer.

Link copied to clipboard

The names of the visible WMS layers.

Link copied to clipboard

The preferred image format of the WmsLayer. If the service does not support the 'preferred' image format, images will be returned in a supported format; An error will not be generated.

Link copied to clipboard
val sublayers: StateFlow<List<LayerContent>>

The WMS Sublayers.

Link copied to clipboard
val url: String?

The URL of the WmsLayer. This method can't be called once the layer is loading else ErrorType.CommonIllegalState exception will occur.

Link copied to clipboard

The WMS version of the WmsLayer. This API supports the following WMS versions: 1.3.0, 1.1.1, and 1.1.0. By default this value is the latest supported WMS version.

Inherited properties

Link copied to clipboard

The attribution text for the layer.

Link copied to clipboard

The brightness of the layer.

Link copied to clipboard
open override val canChangeVisibility: Boolean

A flag indicating whether the layer content's visibility can be changed. A flag indicating whether the layer content visibility can be changed. Will return false if an error occurs.

Link copied to clipboard

The contrast of the layer.

Link copied to clipboard

The description for the layer. The description of the layer.

Link copied to clipboard

The full extent of this layer, which is the extent where all layer data is contained. You can use this to zoom to all of the data contained in this layer. For feature layers, the extent is retrieved from the tables extent.

Link copied to clipboard
open override val fullTimeExtent: StateFlow<TimeExtent?>

The full time extent of the object. A null if the object is not time aware or if an error occurs.

Link copied to clipboard

The gamma of the layer.

Link copied to clipboard
var id: String

The unique identifying string for the layer, for example specified in a map or scene. The id is used by other parts of this API to refer to a specific Layer, such as in a set of FeatureFenceParameters or a FacilityLayerDefinition. If not supplied, all layers will be assigned a unique id when created.

Link copied to clipboard

Whether the layer supports identify. If the layer is not loaded it may return false if identify support is determined by metadata that is not yet available.

Link copied to clipboard
open override var isTimeFilteringEnabled: Boolean

A flag indicating whether the object must use the time extent defined on the owning GeoView to filter its data.

Link copied to clipboard
open override var isVisible: Boolean

The layer content's visibility. The layer content visibility. Will return false if an error occurs.

Link copied to clipboard
val item: Item?

The item the layer has been created from.

Link copied to clipboard
open override val loadStatus: StateFlow<LoadStatus>

The load status.

Link copied to clipboard

The maximum scale for the layer. This controls the maximum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard

The minimum scale for the layer. This controls the minimum scale level the layer can zoom to. All of the connected map views will be updated.

Link copied to clipboard
open override var name: String

The name of this layer.

Link copied to clipboard

The opacity for the layer. All of the connected map views will be updated.

Link copied to clipboard
open override var refreshInterval: Long?

The objects refresh interval. The refresh interval, in milliseconds. A refresh interval of null means never refresh.

Link copied to clipboard
open override var showInLegend: Boolean

A flag indicating whether the layer content participates in the legend. A flag indicating whether the layer content is shown in the legend.

Link copied to clipboard

The spatial reference of the layer.

Link copied to clipboard
open override val subLayerContents: StateFlow<List<LayerContent>>

The sub layer contents of a layer content.

Link copied to clipboard
open override val supportsTimeFiltering: Boolean

A flag indicating whether the object supports filtering its contents by time values with the extent set on the owning GeoView.

Link copied to clipboard
open override val timeInterval: TimeValue?

The suggested time slider step size for this time aware object. Can be null if no time interval is suggested for this time aware object.

Link copied to clipboard
open override var timeOffset: TimeValue?

The time offset applied to this object. The offset is subtracted from the time extent set on the owning GeoView. This allows for data from different periods of time to be compared.

Link copied to clipboard
val visibilityChanged: SharedFlow<Boolean>

Callback invoked when the visibility of the layer changes.

Functions

Link copied to clipboard
open override fun clone(): WmsLayer

Clones the WmsLayer.

Inherited functions

Link copied to clipboard
open override fun cancelLoad()

Cancels loading metadata for the Loadable object.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open suspend override fun fetchLegendInfos(): Result<List<LegendInfo>>

Fetches the list of legend info.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isVisibleAtScale(scale: Double): Boolean

Returns the layer content's effective visibility at the specified scale. Returns the effective layer content visibility. This effective visibility takes care of the effective visibility of the parents at the specified scale. Will return false if an error occurs.

Link copied to clipboard
open suspend override fun load(): Result<Unit>

Loads the metadata for the object.

Link copied to clipboard
open suspend override fun retryLoad(): Result<Unit>

Loads or retries loading metadata for the object.