OpenLayers.Rule

This class represents an SLD Rule, as being used for rule-based SLD styling.

Summary
OpenLayers.RuleThis class represents an SLD Rule, as being used for rule-based SLD styling.
Properties
name{String} name of 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.RuleCreates a Rule.
Functions
destroynullify references to prevent circular references and memory leaks
evaluateevaluates this rule for a specific feature
cloneClones this rule.

Properties

name

{String} name of this rule

minScaleDenominator

{Number} or {String} minimum scale at which to draw the feature.  In the case of a String, this can be a combination of text and propertyNames in the form “literal ${propertyName}”

maxScaleDenominator

{Number} or {String} maximum scale at which to draw the feature.  In the case of a String, this can be a combination of text and propertyNames in the form “literal ${propertyName}”

Constructor

OpenLayers.Rule

Creates a Rule.

Parameters

options{Object} An optional object with properties to set on the rule

Returns

{OpenLayers.Rule}

Functions

destroy

destroy: function()

nullify references to prevent circular references and memory leaks

evaluate

evaluate: function(feature)

evaluates this rule for a specific feature

Parameters

feature{OpenLayers.Feature} feature to apply the rule to.

Returns

{Boolean} true if the rule applies, false if it does not.  This rule is the default rule and always returns true.

clone

clone: function()

Clones this rule.

Returns

{OpenLayers.Rule} Clone of this rule.

destroy: function()
nullify references to prevent circular references and memory leaks
evaluate: function(feature)
evaluates this rule for a specific feature
clone: function()
Clones this rule.
Creates a Rule.
Features are combinations of geography and attributes.
Close