Running getGetFeatureInfoUrl() against a TileWms source returns: Either no layer was queryable, or no layers were specified using QUERY_LAYERS

My URL is:


GeoServer docs say: If application/vnd.ogc.gml is supported the request should be successful. All of the layers in question have GML as an available output format in the layer preview options in GeoServer.

OpenLayers docs say: If QUERY_LAYERS is not provided then the layers specified in the LAYERS parameter will be used. LAYERS params is set on all these layers upon configuration.

  • what is the exact url you are trying?
    – Ian Turton
    Commented Aug 20, 2019 at 11:39
  • getFeatureInfoUrl returns geoserver.xxx.com/geoserver/yyy/…
    – Ryan
    Commented Aug 20, 2019 at 12:14
  • 1
    Please edit your question with any additional info, don't put it in comments.
    – TomazicM
    Commented Aug 20, 2019 at 12:40
  • try this --> geoserver.xxx.com/geoserver/yyy/…
    – pavlos
    Commented Aug 20, 2019 at 12:47
  • @pavlos that might be useful for debugging but overriding the url returned by OpenLayers is unlikely to be a practical long term option
    – Mike
    Commented Aug 20, 2019 at 13:00

1 Answer 1


You have several problems with that URL.

  1. Two versions specified: You can't use version=1.3 and version=1.1.1 in the same request as the format of the request changed between those versions (X,Y vs I,J).

  2. Missing QUERY_LAYERS: If you look at the GeoServer documentation you will see that QUERY_LAYERS is a required parameter (it can be a subset or all of LAYERS as required).

  3. INFO_FORMAT=application/json: If you want GML output then you will need to set INFO_FORMAT=application/vnd.ogc.gml.

  • QUERY_LAYERS doesn't have to be a list of any of any of layers from the GetMap request, just available in the service.
    – nmtoken
    Commented Aug 21, 2019 at 7:11
  • I think geoserver at least will not find a feature that has not been drawn on the map.
    – Ian Turton
    Commented Aug 21, 2019 at 11:26

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.