CSS CookbookΒΆ
The CSS Cookbook is a collection of CSS “recipes” for creating various types of map styles. Wherever possible, each example is designed to show off a single CSS feature so that code can be copied from the examples and adapted when creating CSS styles of your own. Most examples are shared with the SLD Cookbook, to make a comparison between the two syntaxes immediate.
The CSS Cookbook is divided into four sections: the first three for each of the vector types (points, lines, and polygons) and the fourth section for rasters. Each example in every section contains a screen-shot showing actual GeoServer WMS output and the full CSS code for reference.
Each section uses data created especially for the Cookbooks (both CSS and SLD), with shapefiles for vector data and GeoTIFFs for raster data. The projection for data is EPSG:4326. All files can be easily loaded into GeoServer in order to recreate the examples.
Data type | Shapefile |
---|---|
Point | sld_cookbook_point.zip |
Line | sld_cookbook_line.zip |
Polygon | sld_cookbook_polygon.zip |
Raster | sld_cookbook_raster.zip |
- Points
- Lines
- Example lines layer
- Simple line
- Line with border
- Dashed line
- Railroad (hatching)
- Spaced graphic symbols
- Alternating symbols with dash offsets
- Line with default label
- Labels along line with perpendicular offset
- Label following line
- Optimized label placement
- Optimized and styled label
- Attribute-based line
- Zoom-based line
- Polygons
- Rasters