Skip to main content
A newer version of this page is available. .

Web Map Service Provider

Web Map Services (WMS) provide the capability of receiving geographical data images from a map server.

The Map Control allows you to use Web Map Services as a data provider for an ImageLayer of the MapControl.

WpfWmsDataProvider

To work with the provider, use the WmsDataProvider class.

The WmsDataProvider class allows you to use the Web Map Services to provide data to a Map control. To do this, assign an instance of the WmsDataProvider class to the ImageLayer.DataProvider property.

WpfMapControlWmsDataProvider

To connect to the required web server, define the server URI path using the WmsDataProvider.ServerUri property.

If the name of a required layer, which is provided by the map server, is known, assign it to the WmsDataProvider.ActiveLayerName property.

WpfMapControlActiveLayer

In case when layer names are unknown, it is possible to handle the WmsDataProvider.ResponseCapabilities event. CapabilitiesResponsedEventArgs provides the CapabilitiesResponsedEventArgs.Layers collection, containing available layers, and other layer parameters, such as WmsLayer.Name, WmsLayer.Children, and WmsLayer.Title. Refer to the How to: Obtain a Collection of Available Layers in the ResponseCapabilities Event Handler example to learn how to obtain layers in the WmsDataProvider.ResponseCapabilities event handler.

See Also