This sample demonstrates how to connect to a WMS service and list available layers and sublayers. Layers are shown in a hierarchy. Selecting a group layer will recursively select all sublayers for display.
- Open the sample. A hierarchical list of layers and sublayers will appear.
- Select a layer to enable it for display. If the layer has any children, the children will also be selected.
- A
WmsService
is created and loaded. - A
WmsService
has aServiceInfo
property, which is aWmsServiceInfo
WmsServiceInfo
has aWmsLayerInfo
for each layer (excluding sublayers) in theLayerInfos
collection- A method is called to recursively discover sublayers for each layer. Layers are wrapped in a view model and added to a list.
- The view model has a
Select
method which recursively selects or deselects itself and sublayers. - The view model tracks the children and parent of each layer.
- WmsService
- WmsServiceInfo
- WmsLayerInfo
- WmsLayer(List)
WMS, services, browsing, catalog