Time for action – grouping layers
To compose a full map, we will use a couple of styles created in this chapter and one bundled with GeoServer. We won't create new styles; it is just a matter of selecting layers and setting map properties:
On the GeoServer web interface, go to Data | Layer Groups.
Click on the Add new layer group link:
Insert the name you would like to give to the new layer group, for example,
myLayerGroup
.Select the Add layer… link and choose the states layer from the list:
Repeat the previous step to add 10m_roads_north_america and 50m_-rivers-lake-centerlines layers.
In the Coordinate Reference System textbox, insert the EPSG:4326 string. Then click on the Generate Bounds button.
Note
You could also build a map with a different SRS than that of layers. In this case, data will be projected at runtime.
You composed the map, but as you selected the layers, they were added with their default style. Click on the style name for the roads layer and select the RoadsThematicScale style...