Skip to content

Publishing a Layer Group

Now that we’ve published the necessary layers (manual:ne_110m_coastline and manual:SR_50M), we can combine them into a Layer Group.

A layer group lets you display multiple layers together in a single, unified map view, making it easier to manage and present related datasets. This is especially useful when creating composite maps that need to be styled and served as one.


Step 1: Access Creation Page

To begin creating your layer group, you’ll need to open the creation page in GeoServer.

  1. In the left-hand menu, under the Data section, click Layer Groups.

  2. Click Add New Layer Group.

  3. The New Layer Group page will open.


Layer Group Page
Image credit: GeoServer


Step 2: Publish Layer Group

Layer groups let you combine multiple layers into a single visual map in GeoServer. In this step, we’ll set up a simple basemap by stacking a shaded relief layer with a coastline layer.

  1. On the New Layer Group page, enter the following details:

    Field Value
    Name basemap
    Title basemap
    Workspace manual


  2. Under the Layers section, click Add Layer....

  3. Select the SR_50M layer first, then select the ne_110m_coastline layer.

  4. Adding the coastline second ensures it displays on top of the shaded relief background.

  5. Under Bounds, click Generate Bounds.

  6. With the layers added, GeoServer will automatically determine the spatial extent and reference system for the group.

  7. Click Save to finish.


📝
Layer groups can be global, allowing you to combine layers from different workspaces into a single map view.


Create Layer Group
Image credit: GeoServer


Step 3: Preview Image

After publishing your layer group, it’s important to confirm that it renders as intended and that all included layers align correctly. This quick check ensures your map is ready for use or further styling.

  1. In the left-hand menu, under the Data section, click Layer Preview.

  2. Locate the basemap layer group in the list.

  3. Under the Common Formats column, click OpenLayers.


A new browser tab will open, displaying your layer group on an interactive OpenLayers map where you can zoom, pan, and verify the results visually.


Preview Layer Group
Image credit: GeoServer



Next up: Discover how to create a style and link it to your layer for display.