Time for action – creating a simple line style
We will use a rivers and lake centerlines shapefile from Natural Earth to create a map of the rivers of the world with a light sky blue color:
Take the
PopulatedPlaces.xml
file, make a copy toRivers.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>Rivers</Name>
Go to line 11 and replace the text inside the
Title
element with the following:<Title> Geoserver Beginners Guide: Rivers simple stroke </Title>
Now, replace the
FeatureTypeStyle
code (from line 13 to 25) with the following code. We are using a continuous line, which is the default, setting a width of2
pixels and a color:<Rule> <LineSymbolizer> <Stroke> <CssParameter name="stroke">#82CAFA</CssParameter> <CssParameter name="stroke-width">2</CssParameter> ...