Skip to content

Create WebMap with filter on layer? #14266

@bertt

Description

@bertt

I'm trying to create a webmap with a layer containing a filter in a json webmap document, I tried with a params CQL_FILTER (see below) but that doesn't work, the layer doesn't show up and there is an exclamation mark about an error (not specified).

Without the CQL_FILTER is works allright (but the filter is missing :-( )

Question: How to set a filter on a layer in a webmap json document? Btw is there any proper documentation about the JSON webmap document?

Sample JSON:

{
  "title": "mytitle",
  "data": {
    "map": {
      "projection": "EPSG:3857",
      "units": "m",
      "zoom": 5,
      "center": {
        "x": 525086.3811996272,
        "y": 6841251.048890218,
        "crs": "EPSG:3857"
      },
      "maxExtent": [
        416116.976984477,
        6737506.457127964,
        636883.7515812211,
        6944811.312635323
      ],
      "groups": [],
      "layers": [
        {
          "type": "wms",
          "url": "https://myserver/geoserver/ows",
          "name": "test",
          "title": "test",
          "group": "Default",
          "visibility": true,
          "opacity": 1,
          "format": "image/png",
          "singleTile": false,
          "styles": [
            "my_style"
          ],
          "params": {
            "CQL_FILTER": "STATUS = 'Test'"
          }
        }
      ]
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions