Introduction to the OpenGeo Suite
Creating a layer group¶
A layer group, as its name suggests, is a group of layers. Grouping is useful when creating a “basemap”, or other situations when many single layers are requested simultaneously and frequently from a WMS. Layer groups also let you combine data with different geometries and content.
In the previous sections, we loaded multiple layers from PostGIS. Now we’ll use a layer group to combine them into a single virtual layer.
From the GeoServer web interface page, click the Layer Groups link, under Data on the left side of the page.
Click Add new layer group at the top of the page.
Enter earthmap in the Name field. Don’t click Save yet.
Skip the Bounds and other form fields for now.
Now we will add layers to our layer group. Scroll down click the Add Layer link.
Select each of the following layers so that they appear in this order:
To make it easier to find the appropriate layers, type in earth in the search box to narrow the listing.
Layer order in the group definition is important. The top layer in the list will be drawn first, the bottom last. Make sure to match the order of the above list.
Reorder the layers if necessary by clicking on the Position arrows for each layer.
Check the Default Style box for all four layers.
Now, click the Generate Bounds button to determine the bounding box for the entire layer group. This button will also determine the projection of the layer group, equal to the top layer’s projection by default. If the projection is not found automatically, enter EPSG:4326.
Click Save when done.
Preview the layer by going to the Layer Preview.
Boundless provides commercial open source software for internet mapping and geospatial application development. We are dedicated to the growth and support of open source software.
This work is licensed under a Creative Non Commercial-Commons Attribution-Share Alike 3.0 United States License. Feel free to use this material, but we ask that you please retain the Boundless branding, logos and style.