Time for action – using a graphic filling
Colors may help you in pointing out some areas, but you may need something different. If you want to represent wooded areas in topographic maps, you can insert many little markers, each one representing a circle. Patterns of markers are widely used in mapping. As we did with points and lines, the solution is using an external graphic resource. A bitmap or a vector, for example, an SVG
file, can be used to fill a polygon:
Take the
Countries.xml
file, make a copy toCountriesGraphics.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>CountriesGraphics</Name>
Go to line 11 and replace the text inside the
Title
element with the following:<Title>Geoserver Beginners Guide: Countries with graphics filling</Title>
Take the
fill.svg
file and copy it to the<GEOSERVER_HOME>/data/styles
folder.Now you need to add a
Fill
section just inside...