We can summarize that there are two ways to style a feature. The first is applying a symbolizer hash directly to the feature (see the Styling features using symbolizers recipe). The second is applying the style to the layer so every feature contained in it becomes styled.
The second one is the preferred way in many situations. It is a generic way to style all the features in a layer by setting some styles and rules.
This recipe shows how we can use the
StyleMap instances and how easily we can style all the points of a layer without applying a style on each feature. The output of this recipe should look similar to the following screenshot:
In addition, the technique we will ...