Creating scale-dependent rules

Most maps contain more than one layer—each one styled with one or more symbols according to its complexity and the map purpose.

When you browse interactive maps with many layers, you can see that the map changes its style according to the zoom level. When your view on the data is a portrait of the entire world, symbols are simple and there are a few features drawn on the map. As you get closer, you can see more labels, major roads change their symbols, and minor roads appear.

This approach lets you insert a large quantity of information on a web map while avoiding producing an almost unreadable jumble of labels and symbols.

How can you do a similar map with CSS code? It's again a matter of creating filters. This time, ...

Get GeoServer Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.