LineString symbols
Lines are other simple features you can draw on your map. Inside a rule for lines, you have the <LineSymbolizer>
element where you define color, thickness, and the type of line to draw (for example, a continuous or a dashed line). As for points, we will start with a simple symbol and then move to examples that are more complex.
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. Find the text inside the<Name>
element and replace it with the following line of code:
<Name>Rivers</Name>
- Replace the text inside the
<Title>
element with the following lines of code:
<Title> Geoserver Beginners Guide: Rivers simple stroke </Title>
- Now replace the
<FeatureTypeStyle>
code with the following piece of code. We...