MapInfo Pro

 View Only

MapInfo Monday: Make WMS Layer not Selectable

  • 1.  MapInfo Monday: Make WMS Layer not Selectable

    Posted 05-16-2022 08:00
    Edited by Peter Møller 05-16-2022 08:03
    Happy #MapInfoMonday,

    In today's post, we will look at one of the small improvements that made it into MapInfo Pro v2021. With every release of MapInfo Pro we add improvements of different sizes. Some are quite big and some a quite small. But even the small improvements can be very valuable to the users.

    In this specific case, the request for this improvement came through the MapInfo Pro Community here​ just before we started working on the release, and when we looked through Precisely Ideas we found a similar request for this. The request was basically to be able to control if the Info tool should return values from a WMS layer or not.

    WMS and attribute information

    Typically, when you open a WMS Layer into a map window in MapInfo Pro, you get an image rendered by the WMS Service for the specific WMS Layer(s). This also means the WMS Service doesn't provide the attribute information with this request.

    The OGC Web Map Service specification does however also specify how you can request attribute information for a layer using a dedicated request type: GetFeatureInfo. Some WMS Servers supports this, others don't. And for the servers that support this, it might only be possible for some of the layers.

    Now up until MapInfo Pro v2021, we would always request the attribute information from a WMS Layer if the service supported it.

    How it works

    Let's open a couple of WMS Layers into a map in MapInfo Pro. I access this via the Mapping (WMS) control from the Open dropdown

    The first layer I select from a Danish WMS Service doesn't support GetFeatureInfo. You can tell as there is not (i) icon next to the layer names in the Open WMS Table dialog..

    The other service does however support GetFeatureInfo. Notice the (i) icon next to all the layers visible. You may also see some services where only some of the layers support GetFeatureInfo.

    Once I have added these to a map, it looks like this. A map with a base map overlayed with a property map.

    If we take a closer look at the Layer List, you'll notice that one of the layers is set to be selectable and the other isn't. The selectable layer is the one that supports GetFeatureInfo.

    You can use the Selectable icon to control yourself which WMS layer you want to query using GetFeatureInfo when you click in the map with the Info tool. And the fact that this icon is available for WMS Layers is in fact the improvement.

    Below you can see an example of the result from the GetFeatureInfo request for the selectable WMS Layer.

    I hope you find this small improvement to MapInfo Pro v2021 helpful.

    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data