I am trying to fetch data from geoserver WMS layer in geojson. When previewing layer everything works fine:

I tried to adjust above link with using this tutorial to get json response:,50.750177078705356,4.4957029774594135,50.921063532317916

but I got empty json response:


I tried with testing with different layers, but no luck so far. Layers are created from raster images and the have time dimension.


1 Answer 1


The correct URL to get JSON is,44.68002319335938,13.728103637695314,44.81872558593751

It returns


I used the browser network console, clicked, and just changed the INFO_FORMAT to application/json. All else I copied verbatim from the request the demo GUI sent.

When you sent your request you used FORMAT=application/json, which tries to request the WMS image in application/json. This obviously does not work, although I don't see why a GetFeatureInfo request needs the format parameter anyways, because it's not returning an image...

  • 1
    It needs it because dumb clients can just add Info_Format and I and J to the whole request with out any need to parse it and modify it
    – Ian Turton
    Commented Jan 16, 2023 at 8:29
  • 1
    It needs it because the GetFeatureInfo request is stateless. The server doesn't know what map was being looked at when the client clicks on a location. So the info request has to include all the information to create the map, plus extra parameters to specify the response for the information
    – nmtoken
    Commented Jan 16, 2023 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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