C# Class ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer

A layer for OGC Web Map Services.
Inheritance: DynamicMapServiceLayer, ILegendSupport, ISublayerVisibilitySupport
Exibir arquivo Open project: Esri/arcgis-toolkit-sl-wpf Class Usage Examples

Public Properties

Property Type Description
ImageFormatProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
BuildLayersAttribution void
CheckForError bool
CreateAttributionTemplate void
CreateLayerInfo LayerInfo
CreateLayerInfos IList
CreateLegendInfo LayerLegendInfo
CreateLegendInfos IEnumerable
CreateUrl string
CrsFromSR string
Descendants IEnumerable
GetEnvelope Envelope
GetSpatialReference SpatialReference
GetSpatialReference SpatialReference
GetSpatialReference SpatialReference
GetValidVersionNumber string
GetVisibleLayers IEnumerable
LowerThan13Version bool
OnVisibilityChanged void
ParseCapabilities void
ScaleHintToScale double
SetAttribution void
SetVisibleLayers void
SetVisibleLayers void
UseLatLon bool
UseLatLon bool
client_DownloadStringCompleted void

Public Methods

Method Description
GetLayerVisibility ( int layerID ) : bool

Gets the sub-layer visibility.

GetUrl ( DynamicLayer properties, DynamicMapServiceLayer onComplete ) : void

Gets the URL. Override from DynamicMapServiceLayer

The Map has a private method loadLayerInView which calls Layer.Draw. The DynamicMapServiceLayer abstract class overrides the Draw method and calls DynamicMapServiceLayer.GetUrl which must be implemented in a subclass. The last parameter is the OnUrlComplete delegate, which is used to pass the appropriate values (url, width, height, envelope) to the private DynamicMapServiceLayer.getUrlComplete method.

Initialize ( ) : void

Initializes this a WMS layer. Calls GetCapabilities if SkipGetCapabilities is false.

QueryLegendInfos ( Action callback, Action errorCallback ) : void

Queries for the legend infos of a layer.

The returned result is encapsulated in a LayerLegendInfo object. This object represents the legend of the map service layer and contains a collection of LayerLegendInfos (one by sublayer)

SetFullExtent ( Envelope fullExtent ) : void

Sets the full extent. This method is useful only if SkipGetCapabilities is true otherwise the full extent is set by the metadata.

SetLayerVisibility ( int layerID, bool visible ) : void

Sets the sublayer visibility.

WmsLayer ( ) : System

Initializes a new instance of the WmsLayer class.

Private Methods

Method Description
BuildLayersAttribution ( LayerInfo layerInfo ) : void
CheckForError ( DownloadStringCompletedEventArgs e ) : bool
CreateAttributionTemplate ( WmsLayer layer ) : void
CreateLayerInfo ( System.Xml.Linq.XElement layer, string ns, string inheritedAttribution = "" ) : LayerInfo

Creates the layer info from the layer XElement.

CreateLayerInfos ( System.Xml.Linq.XElement layers, string ns, string inheritedAttribution = "" ) : IList

Creates the list of layer infos from the layers XElement.

CreateLegendInfo ( WmsLayer layerInfo ) : LayerLegendInfo

Creates the legend info from a layer info.

CreateLegendInfos ( IEnumerable layerInfos ) : IEnumerable

Creates the list of legend infos from the layer infos.

CreateUrl ( string url, string querystring ) : string
CrsFromSR ( int wkid ) : string
Descendants ( IEnumerable layerInfos ) : IEnumerable
GetEnvelope ( System.Xml.Linq.XElement element, bool lowerThan13 ) : Envelope
GetSpatialReference ( System.Xml.Linq.XAttribute att ) : SpatialReference
GetSpatialReference ( System.Xml.Linq.XElement element ) : SpatialReference
GetSpatialReference ( string crs ) : SpatialReference
GetValidVersionNumber ( ) : string
GetVisibleLayers ( IEnumerable layerInfos ) : IEnumerable
LowerThan13Version ( ) : bool
OnVisibilityChanged ( ) : void
ParseCapabilities ( System.Xml.Linq.XDocument xDoc ) : void
ScaleHintToScale ( double scaleHint ) : double
SetAttribution ( ) : void
SetVisibleLayers ( ) : void

Init the visibility of the layers from the visibleLayers array When a layer is in the array visibleLayers, it is visible (whatever the visibility of its parent) and all its descendants are visible so in the LayerTree we have to set the visibility for all ascendants and all descendants.

SetVisibleLayers ( WmsLayer layerInfo ) : void
UseLatLon ( System.Xml.Linq.XElement crsElement ) : bool
UseLatLon ( int extentWKID ) : bool
client_DownloadStringCompleted ( object sender, DownloadStringCompletedEventArgs e ) : void

Method Details

GetLayerVisibility() public method

Gets the sub-layer visibility.
public GetLayerVisibility ( int layerID ) : bool
layerID int The sub-layer ID.
return bool

GetUrl() public method

Gets the URL. Override from DynamicMapServiceLayer
The Map has a private method loadLayerInView which calls Layer.Draw. The DynamicMapServiceLayer abstract class overrides the Draw method and calls DynamicMapServiceLayer.GetUrl which must be implemented in a subclass. The last parameter is the OnUrlComplete delegate, which is used to pass the appropriate values (url, width, height, envelope) to the private DynamicMapServiceLayer.getUrlComplete method.
public GetUrl ( DynamicLayer properties, DynamicMapServiceLayer onComplete ) : void
properties DynamicLayer The image export properties.
onComplete DynamicMapServiceLayer OnUrlComplete delegate.
return void

Initialize() public method

Initializes this a WMS layer. Calls GetCapabilities if SkipGetCapabilities is false.
public Initialize ( ) : void
return void

QueryLegendInfos() public method

Queries for the legend infos of a layer.
The returned result is encapsulated in a LayerLegendInfo object. This object represents the legend of the map service layer and contains a collection of LayerLegendInfos (one by sublayer)
public QueryLegendInfos ( Action callback, Action errorCallback ) : void
callback Action The method to call on completion.
errorCallback Action The method to call in the event of an error.
return void

SetFullExtent() public method

Sets the full extent. This method is useful only if SkipGetCapabilities is true otherwise the full extent is set by the metadata.
public SetFullExtent ( Envelope fullExtent ) : void
fullExtent Envelope The full extent.
return void

SetLayerVisibility() public method

Sets the sublayer visibility.
public SetLayerVisibility ( int layerID, bool visible ) : void
layerID int The sublayer ID.
visible bool The sublayer visibility.
return void

WmsLayer() public method

Initializes a new instance of the WmsLayer class.
public WmsLayer ( ) : System
return System

Property Details

ImageFormatProperty public_oe static_oe property

Identifies the ImageFormat dependency property.
public static DependencyProperty,System.Windows ImageFormatProperty
return System.Windows.DependencyProperty