| Package | com.esri.ags.layers |
| Class | public class WMSLayer |
| Inheritance | WMSLayer DynamicMapServiceLayer Layer mx.core.UIComponent |
| Since : | ArcGIS API for Flex 2.1 |
Tip: If the WMS server doesn't have a crossdomain.xml file, you can either use a proxy or set skipGetCapabilities to true.
See also
| Property | Defined By | ||
|---|---|---|---|
| abstract : String
The abstract for the WMS service. | WMSLayer | ||
| disableClientCaching : Boolean
If true, adds a timestamp parameter ("_ts") to the HTTP request to prevent the request from
being loaded from the browser's cache. | WMSLayer | ||
| imageFormat : String
The output image format. | WMSLayer | ||
| initialExtent : Extent [override]
Initial extent as defined by the web map service. | WMSLayer | ||
![]() | isInScaleRange : Boolean [read-only]
Returns true if the current scale of the map is between the maximum and minimum scale of the layer [added in version 1.3]. | Layer | |
| layerInfos : Array
The list of layers available in this service. | WMSLayer | ||
![]() | loaded : Boolean [read-only]
When the layer is loaded, the value becomes "true" and layer properties can be accessed. | Layer | |
![]() | loadFault : Fault [read-only]
A reference to the fault that is dispatched when the layer throws a loadError event. | Layer | |
![]() | map : Map [read-only]
A reference to the Map this layer is in. | Layer | |
| maxImageHeight : int
The maximum height, in pixels, supported by the WMS service. | WMSLayer | ||
| maxImageWidth : int
The maximum width, in pixels, supported by the WMS service. | WMSLayer | ||
![]() | maxScale : Number
The maximum scale of the layer [added in version 1.3]. | Layer | |
![]() | minScale : Number
The minimum scale of the layer [added in version 1.3]. | Layer | |
| password : String
The password used to log in to the WMS server. | WMSLayer | ||
| proxyURL : String
The URL to proxy the request through. | WMSLayer | ||
| requestTimeout : int
The request timeout in seconds. | WMSLayer | ||
| skipGetCapabilities : Boolean
Whether to skip the initial request to get capabilities. | WMSLayer | ||
| spatialReference : SpatialReference [override]
The spatial reference of the web map service. | WMSLayer | ||
| title : String
The title for the WMS service. | WMSLayer | ||
| units : String [override]
The units of the layer. | WMSLayer | ||
| url : String
Required. | WMSLayer | ||
| username : String
The user name used to log in to the WMS server. | WMSLayer | ||
| version : String
Gets or sets the WMS version [optional]. | WMSLayer | ||
| visibleLayers : IList
Required. | WMSLayer | ||
| Method | Defined By | ||
|---|---|---|---|
WMSLayer(url:String = null, proxyURL:String = null)
Creates a new WMSLayer object. | WMSLayer | ||
![]() | refresh():void
Causes the layer to redraw or reload its content. | Layer | |
| abstract | property |
abstract:StringThe abstract for the WMS service.
This property can be used as the source for data binding.
public function get abstract():String public function set abstract(value:String):void| disableClientCaching | property |
disableClientCaching:BooleanIf true, adds a timestamp parameter ("_ts") to the HTTP request to prevent the request from being loaded from the browser's cache.
The default value is false.
This property can be used as the source for data binding.
public function get disableClientCaching():Boolean public function set disableClientCaching(value:Boolean):void| imageFormat | property |
imageFormat:String| Since : | ArcGIS API for Flex 2.2 |
The output image format. Valid types are: png | jpg | gif. Only png and gif formats support transparency.
The default value is png.
This property can be used as the source for data binding.
public function get imageFormat():String public function set imageFormat(value:String):void| initialExtent | property |
initialExtent:Extent[override] Initial extent as defined by the web map service. Used by the map if it is the first layer in the map and map doesn't have an extent specified.
This property can be used as the source for data binding.
public function get initialExtent():Extent public function set initialExtent(value:Extent):void| layerInfos | property |
layerInfos:ArrayThe list of layers available in this service.
This property can be used as the source for data binding.
public function get layerInfos():Array public function set layerInfos(value:Array):voidSee also
| maxImageHeight | property |
maxImageHeight:intThe maximum height, in pixels, supported by the WMS service. Only used if value is greater than 0.
The default value is 0.
This property can be used as the source for data binding.
public function get maxImageHeight():int public function set maxImageHeight(value:int):void| maxImageWidth | property |
maxImageWidth:intThe maximum width, in pixels, supported by the WMS service. Only used if value is greater than 0.
The default value is 0.
This property can be used as the source for data binding.
public function get maxImageWidth():int public function set maxImageWidth(value:int):void| password | property |
password:StringThe password used to log in to the WMS server. Only Basic authentication is supported.
public function get password():String public function set password(value:String):void| proxyURL | property |
proxyURL:StringThe URL to proxy the request through.
This property can be used as the source for data binding.
public function get proxyURL():String public function set proxyURL(value:String):void| requestTimeout | property |
requestTimeout:intThe request timeout in seconds. A value less than or equal to zero prevents request timeout.
The default value is -1.
This property can be used as the source for data binding.
public function get requestTimeout():int public function set requestTimeout(value:int):void| skipGetCapabilities | property |
skipGetCapabilities:BooleanWhether to skip the initial request to get capabilities. Set skipGetCapabilities if the site hosting the WMS service does not provide a cross domain policy file and you don't have a proxy page.
The default value is false.
This property can be used as the source for data binding.
public function get skipGetCapabilities():Boolean public function set skipGetCapabilities(value:Boolean):void| spatialReference | property |
spatialReference:SpatialReference[override] The spatial reference of the web map service. If this is explicitly set, then it will be used instead of the map's own spatial reference when requesting a map from the service (only wkid is supported).
This property can be used as the source for data binding.
public function get spatialReference():SpatialReference public function set spatialReference(value:SpatialReference):void| title | property |
title:StringThe title for the WMS service.
This property can be used as the source for data binding.
public function get title():String public function set title(value:String):void| units | property |
units:String[override] The units of the layer. If the layer is the basemap, the map is in these units.
The default value is UNKNOWN_UNITS.
This property can be used as the source for data binding.
public function get units():String public function set units(value:String):voidSee also
| url | property |
url:StringRequired. Gets or sets the URL to a WMS service endpoint. For example, http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer, http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi.
This property can be used as the source for data binding.
public function get url():String public function set url(value:String):void| username | property |
username:StringThe user name used to log in to the WMS server. Only Basic authentication is supported.
public function get username():String public function set username(value:String):void| version | property |
version:StringGets or sets the WMS version [optional]. If skipGetCapabilities property is set to true, this value determines version requested. If skipGetCapabilities is false, this value determines version to retrieve. Allowed values are 1.1.0, 1.1.1 or 1.3.0.
The default value is 1.3.0.
This property can be used as the source for data binding.
public function get version():String public function set version(value:String):voidSee also
| visibleLayers | property |
visibleLayers:IListRequired. Gets or sets the unique layer names in a WMS service. Each name is a string value. At least one layer name must be defined.
This property can be used as the source for data binding.
public function get visibleLayers():IList public function set visibleLayers(value:IList):voidSee also
| WMSLayer | () | Constructor |
public function WMSLayer(url:String = null, proxyURL:String = null)Creates a new WMSLayer object.
Parametersurl:String (default = null) — URL to the WMS resource that represents a web map service.
| |
proxyURL:String (default = null) — The URL to proxy the request through.
|
<esri:Map width="1024" height="768">
<esri:extent>
<esri:Extent xmin="-120" ymin="34.1" xmax="-119.3" ymax="34.6">
<esri:SpatialReference wkid="4326"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
<esri:WMSLayer skipGetCapabilities="true"
url="http://hazards.fema.gov/wmsconnector/wmsconnector/Servlet/NFHL"
version="1.1.1">
<esri:visibleLayers>
<s:ArrayList>
<fx:String>Flood_Hazard_Zones_General</fx:String>
</s:ArrayList>
</esri:visibleLayers>
</esri:WMSLayer>
</esri:Map>