This class represents an SLD Rule, as being used for rule-based SLD styling.
ALKMaps.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 | {ALKMaps.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. |
symbolizers | {Array} Collection of symbolizers associated with 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 | |
ALKMaps.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 |
clone | Clones this rule. |
{ALKMaps.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 ALKMaps, but it is the way how symbolizers are defined in SLD.
{Array} Collection of symbolizers associated with this rule. If provided at construction, the symbolizers array has precedence over the deprecated symbolizer property. Note that multiple symbolizers are not currently supported by the vector renderers. Rules with multiple symbolizers are currently only useful for maintaining elements in an SLD document.
evaluate: function( feature )
evaluates this rule for a specific feature
feature | {ALKMaps.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 | {ALKMaps.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 )
Clones this rule.
clone: function()