I have a problem obtaining GeoJSON data from GeoServer with CQL filter. When I do the normal query, I get some results, then it's OK ("totalFeatures":2081).


But when I try to use the CQL filter, the query returns a null result ("totalFeatures":0).

My data is in EPSG:4326, comes from an SQL view, and the filter takes as argument the cursor converts to EPSG:3857 to apply a buffer zone in meters.


Any idea where the problem comes from? Mixing EPSG?

I tried it with a bbox. When I put the parameter directly in the cql filter of the layer on GeoServer, it works; when I call it with leaftlet, it returns an empty result.


I don't understand where the problem comes from...

  • version 1.1.1 is incorrect for WFS, should be one of 1.0.0, 1.1.0, 2.0.0
    – nmtoken
    Aug 27, 2020 at 15:48
  • ok, I tried changing the version and the result is the same...
    – Nicolas L
    Aug 27, 2020 at 16:39
  • did you set up CORS?
    – Ian Turton
    Sep 1, 2020 at 8:09


Your Answer

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

Browse other questions tagged or ask your own question.