Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/workers
Class: WMSLayerInfo

require(["esri/layers/WMSLayerInfo"], function(WMSLayerInfo) { /* code goes here */ });

Description

(Added at v2.1)
The WMSLayerInfo class defines and provides information about layers in a WMS service.

Samples

Search for samples that use this class.

Constructors

NameSummary
new WMSLayerInfo(options?)Creates a new WMSLayerInfo object.

Properties

NameTypeSummary
allExtentsExtent[]All bounding boxes defined for the layer.
descriptionStringThe layer description defines the value of the Abstract capabilities property.
extentExtentThe layer extent.
legendURLStringContains the value of the LegendURL capabilities property.
nameStringThe layer name.
queryableBooleanReturns true if the layer can be queried and the service supports GetFeatureInfo with either text/html or text/plain formats.
showPopupBooleanIndicates if this layer should be included in the popup.
spatialReferencesNumber[]An array of WKIDs of all spatial references defined for the layer.
subLayersWMSLayerInfo[]WMSLayerInfos of the layer's sub layers.
titleStringThe layer title.
Constructor Details

new WMSLayerInfo(options?)

Creates a new WMSLayerInfo object.
Parameters:
<Object> options Optional See options list for parameters.
options properties:
<Extent[]> allExtents Optional All the bounding extents defined for this layer.
<String> description Optional A description of the WMS layer.
<Extent> extent Optional The extent of the WMS Layer.
<String> legendURL Optional The URL to the legend image.
<String> name Required The name of the WMS layer. This is used to set layer visibility.
<Boolean> queryable Optional Returns true if the layer can be queried and the service supports GetFeatureInfo with either text/html or text/plain formats.
<Boolean> showPopup Optional Indicates if this layer should be included in the popup.
<SpatialReference[]> spatialReferences Optional All the spatial references defined for this layer.
<WMSLayerInfo[]> subLayers Optional WMSLayerInfos of the layer's sub layers.
<String> title Optional The title of the WMS layer.
Sample:
require([
  "esri/layers/WMSLayerInfo", ... 
], function(WMSLayerInfo, ... ) {
  var layer = new WMSLayerInfo({name:'1',title:'Rivers'});
  ...
});
Property Details

<Extent[]> allExtents

All bounding boxes defined for the layer. (Added at v3.13)

<String> description

The layer description defines the value of the Abstract capabilities property.

<Extent> extent

The layer extent.

<String> legendURL

Contains the value of the LegendURL capabilities property. (Added at v3.13)

<String> name

The layer name. The layer name must be included in the visibleLayers list.

<Boolean> queryable

Returns true if the layer can be queried and the service supports GetFeatureInfo with either text/html or text/plain formats (Added at v3.17)

<Boolean> showPopup

Indicates if this layer should be included in the popup. (Added at v3.17)
Default value: false

<Number[]> spatialReferences

An array of WKIDs of all spatial references defined for the layer. (Added at v3.13)

<WMSLayerInfo[]> subLayers

WMSLayerInfos of the layer's sub layers.

<String> title

The layer title.