Layer Style Panel

The layer style panel is used to style a layer. It consists of a toolbar and a list of scale ranges defined for the layer. Layer styles apply to specific scale ranges. A layer can be styled the same for all scales by creating a single scale range and entering 0 for both the minimum and maximum scale. Within a scale range, a style is defined by one or more rules. A rule contains an expression, a style, a feature label and a legend label. If the expression is left empty then the rule applies to all features in that scale range. Otherwise, the rule only applies to features that are selected by the expression.

Features within a layer are rendered by finding the first scale range and rule that apply to the feature. Scale ranges and rules are processed from the top of the list to the bottom. It is valid to define scale ranges that overlap and rules that can select the same features because the server will render the feature with the first rule that it finds. Other scale ranges and rules will not be considered once a suitable rule has been found.

Style Toolbar

The style toolbar contains tools for manipulating scale ranges and rules. The first two tools are used to create new scale ranges and new rules respectively. The remaining tools apply to the currently selected scale range or rule. To select a scale range or rule, click in one of the associated input boxes or on the gray box to the left of the scale range or rule. The currently selected scale range or rule is highlighted with a blue background. If a rule is selected, its associated scale range is also highlighted with a lighter background.

Add Scale Range
Append a new scale range to the layer style.
Add Rule
Append a new rule to the currently selected scale range.
Theme
Not implemented
Duplicate Range/Rule
Duplicate the currently selected scale range or rule.
Move Range/Rule Up
Move the currently selected scale range or rule up in its list.
Move Range/Rule Down
Move the currently selected scale range or rule down in its list.
Delete Range/Rule
Delete the currently selected scale range or rule. Deleting a scale range also deletes all its rules.

Scale Ranges

For each scale range, you can configure the following properties:

Min Scale
The minimum scale for which this range is valid. When the map is below this scale, this range does not apply.
Max Scale
The maximum scale for which this range is valid. When the map is above this scale, this range does not apply.

Rules

Each scale range can have one or more associated rules. Rules have the following properties:

Condition
The condition cell contains the condition for this rule, which is a filter expression that determines which features match this rule. The condition may be empty, which means that all features in this scale range will match this rule.
Style
The style cell contains a preview of the style of this rule. Clicking the cell will launch a point, line, or area dialog depending on the geometric type of the layer. The preview of the style is simulated by the web browser and is not intended to be an accurate representation of the layer style. It is provided as a quick visual clue of the style.
Feature Label
The feature label cell contains a preview of the label which will be rendered with this feature. The label can be configured by clicking the cell to launch the Style Label dialog.
Legend Label
The legend label cell contains the text that will be displayed in the map legend for this rule. The legend label may be empty.