Ticket #1940 (new feature)
Support multiple symbolizers per rule in OpenLayers.Format.SLD and OpenLayers.Rule
| Reported by: | ahocevar | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.13 Release |
| Component: | general | Version: | 2.7 |
| Keywords: | Cc: | ||
| State: |
Description
OpenLayers.Rule does not represent one aspect of SLD: multiple symbolizers of the same type (Point, Line, Polygon, Text, ...) in a single rule. The symbolizer property can just hold one symbolizer of each type.
While rendering such rules is something that is planned for OpenLayers 3.0 ( http://trac.openlayers.org/wiki/three/MultipleSymbolizers), a structure representing it can be added now without much effort. This will be useful for applications that modify SLD for server-side (WMS) rendering.
The proposal is to add a Rule.symbolizers property with a structure like this:
rule.symbolizers = {
"point": [pointSymbolizer1, pointSymbolizer2],
"text": [textSymbolizer]
rule.symbolizer will not be affected by this change, and Format.SLD can write both properties when reading an SLD doc.
