Setting up the Style and Symbology

Parent Previous Next

Setting up the Style and Symbology


Setting up the style and symbology is the most fundamental part of the configuration which defines how the features of a layer will be rendered on the map. According to the description in the Mapserver Object Model section the features of the layer are divided into classes. Each class defines the way a subset of the features should be drawn when the layer is rendered on the map. The classes can also be switched on/off depending on the scale to provide a different look of the layer when zooming in and out. The way how the features are drawn is specified by one or more styles attached to the class. The parameters (ie. size, width, colour, location, transparency and symbol) can be modified in the Style Property Editor.


Rendering features with multiple Styles

You can attach multiple styles to the same class in the Layer panel. In this case the individual styles are drawn sequentially to make up the final representation of the feature. In the example below a road layer is drawn by using 3 styles to construct a yellow line with red outline and a red dashed centerline.


Using symbols to draw point layers

The features of a point layer are rendered as a single pixel by most of the MapServer renderers. This behaviour is not correct in most cases when setting up the style of the layer. You might want to select a symbol in the Style Property Editor to provide the right look when the layer is drawn. The available symbols are defined in the MapManager Style Library which utilizes the symbolset file attached to the map. To define a new symbol you might have to edit the symbol file attached to the map. For more information as described in the Working With Map files section.

If a symbolset file contains a symbol with the name "default-marker" then the symbol will be used as the default symbol when drawing the point layers. When using the Auto Style option in the Layer Property Editor the symbol is selected automatically when a symbolset file contains a symbol with the same name as specified in the feature style. If no matching symbol found then the symbol with the name "default-marker" will be selected automatically.
  


Using symbols to draw thick lines and define line patterns

The MapServer renderers allow you to draw single pixel solid lines for the line layers by default. To define thick lines or line patterns you might want to specify a symbol in the Style Property Editor. The width of the line is defined by the symbol size as shown by the symbol selection list.



Using symbols to define fill patterns

The features of the polygon layers are drawn with solid fill and one pixel outline by default. To customise the fill pattern you should specify a symbol in the Style Property Editor. The width of the patterns are defined by the symbol size as shown by the symbol selection list.