Book Image

GeoServer Cookbook

By : Stefano Iacovella
Book Image

GeoServer Cookbook

By: Stefano Iacovella

Overview of this book

Table of Contents (17 chapters)
GeoServer Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Adding filters to your style


Having a map with a single symbol (that is, the same appearance for all features) is not very common. This approach is useful, and it can be used when building an index map to provide a reference showing you which part of the world is represented in the main map.

The real power of styling comes from the representation of features according to their properties, geometrical or nongeometrical. A map created to show attribute values is a thematic map. To create a thematic map, we will need to use filters to select content based on an attribute value.

In this recipe, you will build a map of countries grouped according to the continent they belong.

Tip

The full CSS style for the recipe is located in the continent.css file.

How to do it…

  1. Open the CSS Style section from the GeoServer web interface. Then, select the Choose a different layer link. From the list of layers, select PostGISLocal:Countries.

  2. Select the Create a new style link. In the form, select the NaturalEarth workspace...