The Info Tool provides GetFeatureInfo support for WMS. When you click on the WMS layer with the Info tool, information displays about the features of each layer that you have retrieved from a WMS server. By default, when you open a WMS layer and add it to a map, it is selectable when it meets the following criteria:
- The WMS server must support GetFeatureInfo.
- The WMS server must return GetFeatureInfo data in a format that is supported by MapInfo Pro. These formats are text/plain and the XML and GML formats returned by MapXtreme.
- The WMS servers must specify that at least one of the WMS layers within the WMS table can be queried.
The WMS layer is selectable by default. You can toggle it from the WMS layer in the Explorer window. This is useful when multiple WMS layer are open in the same mapper and you want to see feature info of a particular WMS layer. The selectable On/Off for respective layers will persist in a workspace.
The WMS layer can also be made selectable using the MapBasic statement:
set map layer layer_id selectable on
After making the WMS layer selectable, you can use the Info command (on the MAP tab, in the Options group, click Map Tools, and click Info). Information will be returned only from layers that you can query. The WMS table treeview in the Open WMS Table and WMS Table Properties dialog boxes display an Information icon next to layers that you can query to indicate that the Info tool will work on those layers.
The supported GetFeatureInfo formats include:
- HTML
- Text/plain
- Text/XML (as returned by WMS servers using MapXtreme Java Edition)
- Application/x-mapinfo-GML3 (as returned by WMS servers using MapXtreme)
- Application/x.cubestor-GML.1 (as returned by WMS servers using CubeWerx CubeSERV® WMS)
- Application/vnd.ogc.gml
In some cases, the WMS server may return an error when the user clicks on the map. Error messages are displayed in the info tool window itself. Examples of errors include:
- The WMS Server does not support GetFeatureInfo requests.
- The WMS Server does not return GetFeatureInfo data in a format supported by MapInfo Pro.
- There are no layers that you can query in the WMS table for the GetFeatureInfo request
- The WMS Server returned data in <returned-format> format rather than the requested format of <requested-format>
- Unable to retrieve feature information from the WMS Server.