-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

GeoServer Beginner's Guide

Hatching a polygon is a different way to produce maps similar to those seen in the previous example. The pros are that you don't need to search for or build a graphical resource; you have a set of hatching patterns ready for you. It is also faster for GeoServer to render a map without using external graphic resources. When it is feasible to achieve the same results with internal resources, stick to hatching!
Take the CountriesGraphics.xml
file, make a copy to CountriesHatching.xml
, and then edit the new file in your text editor.
Go to line 9 and replace the text inside the Name
element with the following:
<Name>CountriesHatching</Name>
Go to line 11 and replace the text inside the Title
element with the following:
<Title>Geoserver Beginners Guide: Countries with hatching</Title>
To add code for hatching you need to replace the code of the Graphic
element, from lines 17 to 24. Insert a Mark
element where you set the...
Change the font size
Change margin width
Change background colour