1

I am using Geoserver 2.11.1 with the vector tile extension to render data in mapbox-gl. I'm able to pull the vector tiles in no problem, but I also need to filter the data on the server side.

        map.addSource('testLayer', {
            "type": 'vector',
            "scheme": 'tms',
            "tiles": ["http://localhost:8080/geoserver/gwc/service/tms/1.0.0/dashboard%3Atest_layer@EPSG%3A900913@pbf/{z}/{x}/{y}.pbf"],
        });

        map.addLayer({
            "id": "testLayer",
            "type": "circle",
            "source": "testLayer",
            "source-layer": "test_layer",
            "paint": {
                "circle-color": "#3887be"
            },
            'minzoom': 12
        });

I've tried adding a cql filter as a parameter in the request, but it doesn't seem to work.

 CQL_FILTER=account_no%20%3D%3D%202

Is it possible to filter vector tile data is geoserver using this kind of tms request? If no, is there a way to use WMS request with cql filter for vector tiles?

2

As of GeoServer 2.11.1, nope. You can track this ticket: https://osgeo-org.atlassian.net/browse/GEOS-8065

  • Do you know if there is another way using a wms request? – Owen J Lamb Jun 19 '17 at 18:06
  • Nope, I don't think there is any other way. – Andrea Aime Jun 20 '17 at 18:08
  • It seems like the ticket as of 2.13 Version has been solved?! If so, how do we provide cql_filler? I tried adding parameter at the end, but the result doesn't changes. url + "@EPSG:900913@pbf/{z}/{x}/{-y}.pbf?CQL_FILTER=year=2012" – Dejan P. Sep 4 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.