WMS GetFeautureInfo - ArcGIS Maps SDK for Qt C++

195
3
Jump to solution
2 weeks ago
Labels (1)
Tsub4sa80
New Contributor

Hi to all, I need to send a WMS GetFeatureInfo command to get information from a WMS server.

Which is the method that I need to call, using ArcGIS MAP QT SDK C++, to pack and send my request ?

I need also to add some custom parameters to request. 

 

Thanks, in advance.

0 Kudos
1 Solution

Accepted Solutions
MatveiStefarov
Esri Contributor

To call GetFeatureInfo command, you would use identifyLayerAsync(...) operation on the MapView.  The steps are:

  1. Create a WMSLayer with a URL.
  2. Set the custom parameters. These will be sent with every GetMap and GetFeatureInfo request.
  3. Add layer to your Map, load it, and display it in a MapView
  4. Call identifyLayersAsync on the MapView -- this is often connected to mouseClicked signals to get the clicked position.  This will issue a GetFeatureInfo request for the layer.  Currently, the only supported info format is "text/html".
  5. The completed future will have a IdentifyLayerResult containing a WMSFeature.

Use the "HTML" attribute on the WMSFeature to retrieve this information as returned by the service.  The Geometry property is not implemented yet, and will always return null.

View solution in original post

3 Replies
MatveiStefarov
Esri Contributor

To call GetFeatureInfo command, you would use identifyLayerAsync(...) operation on the MapView.  The steps are:

  1. Create a WMSLayer with a URL.
  2. Set the custom parameters. These will be sent with every GetMap and GetFeatureInfo request.
  3. Add layer to your Map, load it, and display it in a MapView
  4. Call identifyLayersAsync on the MapView -- this is often connected to mouseClicked signals to get the clicked position.  This will issue a GetFeatureInfo request for the layer.  Currently, the only supported info format is "text/html".
  5. The completed future will have a IdentifyLayerResult containing a WMSFeature.

Use the "HTML" attribute on the WMSFeature to retrieve this information as returned by the service.  The Geometry property is not implemented yet, and will always return null.

Tsub4sa80
New Contributor

Thank you for your reply @MatveiStefarov . I haven't tested your solution yet . I will try and provide a feedback asap.

 

0 Kudos
Tsub4sa80
New Contributor

@MatveiStefarov  I have implemented what you suggested, and as a response from the server, I got the following message: 'The request is for a service type not offered by the server' caused by a ServiceException.

I suppose that the problem is on the configuration of the custom parameters. I'm right?

If I need to send a request like this:

http://localhost:8080/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&LAYERS=ENC&QUERY_LAYERS=ENC&...

which kind of custom parameters I need to set?

 

Thank you in advance.

 

0 Kudos