Select to view content in your preferred language

Is it possible to retrieve attribute information from a WMS layer?

698
3
11-29-2023 07:38 AM
WilliamAdnams
Emerging Contributor

I would like to know if it is possible using ArcGis Pro SDK to identify features in a WMS layer
I have written an addin using VB.Net that performs simple intersect analysis with a site location and range of data layers. This is fine for local vector layers, but some data I want to analyze against is from third party WMS layers.
I have these added into the project and I can use the identify tool to get feature attributes at a click point. However I can't see in the SDK a way to replicate this in my code using the site location to retrieve the attributes
Any pointers in the right direction would be appreciated

0 Kudos
3 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Look at ArcGIS Pro SDK community samples IdentifyWithSketchTool or IdentifyWindow

0 Kudos
WilliamAdnams
Emerging Contributor

Thanks,
These samples don't seem to work with my WMS layers.
They use the GetFeatures method on the active mapview eg. var features = mv.GetFeatures(geometry); - which works with feature layers but not WMS layers
Do you know if there is an equivalent method for WMS layers?

Thanks,

0 Kudos
WilliamAdnams
Emerging Contributor

I have worked out a solution for this - just need to compose the GetFeatureInfo URL with the necessary parameters, data layer, query point etc and send the WebRequest to get back the attributes

0 Kudos