This class represents an SLD Rule, as being used for rule-based SLD styling.
| OpenLayers.Rule | This class represents an SLD Rule, as being used for rule-based SLD styling. |
| Properties | |
| id | {String} A unique id for this session. |
| name | {String} name of this rule |
| title | {String} Title of this rule (set if included in SLD) |
| description | {String} Description of this rule (set if abstract is included in SLD) |
| context | {Object} An optional object with properties that the rule should be evaluated against. |
| filter | {OpenLayers.Filter} Optional filter for the rule. |
| elseFilter | {Boolean} Determines whether this rule is only to be applied only if no other rules match (ElseFilter according to the SLD specification). |
| symbolizer | {Object} Symbolizer or hash of symbolizers for this rule. |
| minScaleDenominator | {Number} or {String} minimum scale at which to draw the feature. |
| maxScaleDenominator | {Number} or {String} maximum scale at which to draw the feature. |
| Constructor | |
| OpenLayers.Rule | Creates a Rule. |
| Functions | |
| destroy | nullify references to prevent circular references and memory leaks |
| evaluate | evaluates this rule for a specific feature |
| getContext | Gets the context for evaluating this rule |
{OpenLayers.Filter} Optional filter for the rule.
{Object} Symbolizer or hash of symbolizers for this rule. If hash of symbolizers, keys are one or more of [“Point”, “Line”, “Polygon”]. The latter if useful if it is required to style e.g. vertices of a line with a point symbolizer. Note, however, that this is not implemented yet in OpenLayers, but it is the way how symbolizers are defined in SLD.
evaluate: function( feature )
evaluates this rule for a specific feature
| feature | {OpenLayers.Feature} feature to apply the rule to. |
{Boolean} true if the rule applies, false if it does not. This rule is the default rule and always returns true.
getContext: function( feature )
Gets the context for evaluating this rule
| feature | {OpenLayers.Feature} feature to take the context from if none is specified. |
nullify references to prevent circular references and memory leaks
destroy: function()
evaluates this rule for a specific feature
evaluate: function( feature )
Gets the context for evaluating this rule
getContext: function( feature )