1

I created a workspace, a store and some layers on GeoServer. Then I created a layer group and added a few layers. When I try to load a specific layer on QGIS I use the following URL:

http://localhost:8080/geoserver/workspacename/layername/wms

and everything works fine, I do the connection and is listed only the layer I want and not the whole service layers. Now I want to do the same for a layer group, I want that only a specific layer group be listed when I click on connect button. However, if I do the same as above:

http://localhost:8080/geoserver/workspacename/layergroupname/wms

it gives an error.

In OpenLayers, the layer group is correctly loaded when I do the layer preview in GeoServer, and the resulting URL is the following:

http://localhost:8080/geoserver/workspace/wms?service=WMS&version=1.1.0&request=GetMap&layers=workspace:layergroupname&styles=&bbox=-25.1745333333,30.02271667,-15.85316667,37.2715666667&width=768&height=597&srs=EPSG:4326&format=application/openlayers

but using this URL on QGIS when loading the service, the whole service layers are listed and not just the group layer I want.

How can I restrict to a layer group when loading a WMS service into QGIS?

  • In QGIS (in any WMS client) you can only use the GetCapabilities endpoint to define the data source. But when you select the data, you can just select the data (group layer, layer, or style in a layer) you want to view. If a layer has a name you can select it directly in clients such as OL to create your map. – nmtoken Apr 15 '16 at 16:39
  • Sorry, didn't understand. What I need is to list only a layer group and not the whole service content when connect with a WMS on QGIS. For a layer it works fine using this URL localhost:8080/geoserver/workspacename/layername/wms, but for a layer group does not. What should I do? – Falcoa Apr 15 '16 at 16:45
  • I know that after listing all service content when doing the service connection, I can select the layers I want to load. But that is not my problem. What I want is to restrict the URL in order to list only a specific layer group when doing the connection. – Falcoa Apr 15 '16 at 16:47
  • What I need is to list only a layer group and not the whole service content when connect with a WMS on QGIS Why? – nmtoken Apr 15 '16 at 17:02
  • 1
    Yes, but the reason might influence the answer :) – nmtoken Apr 15 '16 at 17:11

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.