We will see a brief explanation before continuing with this recipe. The goal, as in the other recipes in the chapter, is to style the features of a vector layer depending on their attributes' values or their kind of feature.
OpenLayers.Layer.Vector layer class can have an
OpenLayers.StyleMap instance associated with it, which determines the default style of the layers if it has only one
OpenLayers.Style, or the set of styles that can be applied for each render intent if it contains more than one
OpenLayers.Style. In its own way, each
OpenLayers.Style instance can be used in two forms: