Uploaded image for project: 'GeoServer'
  1. GEOS-7663

GetMap throws exception when using featureid filter against multiple layers

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.2, 2.10-RC1
    • Component/s: WMS
    • Labels:
      None
    • Environment:

      Ubuntu 16.04 & Windows Server 2008 R2

      Description

      When calling a single layer (e.g. foo) via a WMS call you can filter the layer with the featureid=foo.X

      However if you make the same call with an additional layer (e.g. bar) calling featureid=foo.X results in an error.

      Error Message
      'Layers and filters are mismatched, you need to provide one filter for each layer'

      Ticket being raise following advice from Andrea Aime

      ------
      I'm trying to make a WMS call to geoserver which will create an image containing 2 layers foo & bar (foo is a layer group); however bar should be filtered based on featureid.

      When I only load a single layer (e.g. bar) - I can use the filter method &featureid=bar.1 but this same method doesn't work when you try to load multiple layers (e.g. foo & bar).

      Single Layer Filter

      http://localhost:8080/geoserver/foobar/wms?service=WMS&version=1.1.0&request=GetMap&layers=bar&featureid=bar.1&styles=&bbox=349335.379999999,248145.919999682,349354.569999999,248170.619999681&width=768&height=735&srs=EPSG:27700&format=text%2Fhtml%3B%20subtype%3Dopenlayers#toggle
      

      When I run:

      http://localhost:8080/geoserver/foobar/wms?service=WMS&version=1.1.0&request=GetMap&layers=foo,bar&featureid=bar.1&styles=&bbox=349335.379999999,248145.919999682,349354.569999999,248170.619999681&width=768&height=735&srs=EPSG:27700&format=text%2Fhtml%3B%20subtype%3Dopenlayers#toggle
      

      I get an error say that both layers need to be filtered. Any ideas on how to load multiple layers but only filter 1?

        Attachments

          Activity

            People

            • Assignee:
              aaime Andrea Aime
              Reporter:
              hloughrey hugh Loughrey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: