OpenLayers. Style

This class represents a UserStyle obtained from a SLD, containing styling rules.

Summary
OpenLayers. StyleThis class represents a UserStyle obtained from a SLD, containing styling rules.
Properties
name{String}
layerName{String} name of the layer that this style belongs to, usually according to the NamedLayer attribute of an SLD document.
isDefault{Boolean}
Constructor
OpenLayers. StyleCreates a UserStyle.
Functions
destroynullify references to prevent circular references and memory leaks
addRulesAdds rules to this style.
setDefaultStyleSets the default style for this style object.
Constants
OpenLayers. Style. SYMBOLIZER_PREFIXES{Array} prefixes of the sld symbolizers.

Properties

name

{String}

layerName

{String} name of the layer that this style belongs to, usually according to the NamedLayer attribute of an SLD document.

isDefault

{Boolean}

Constructor

OpenLayers. Style

Creates a UserStyle.

Parameters

style{Object} Optional hash of style properties that will be used as default style for this style object.  This style applies if no rules are specified.  Symbolizers defined in rules will extend this default style.
options{Object} An optional object with properties to set on the style.

Valid options

rules{Array(OpenLayers.Rule)} List of rules to be added to the style.

Return

{OpenLayers.Style}

Functions

destroy

destroy: function()

nullify references to prevent circular references and memory leaks

addRules

addRules: function(rules)

Adds rules to this style.

Parameters

rules{Array(OpenLayers.Rule)}

setDefaultStyle

setDefaultStyle: function(style)

Sets the default style for this style object.

Parameters

style{Object} Hash of style properties

Constants

OpenLayers. Style. SYMBOLIZER_PREFIXES

{Array} prefixes of the sld symbolizers.  These are the same as the main geometry types

Contains convenience functions for string manipulation.
destroy: function()
nullify references to prevent circular references and memory leaks
addRules: function(rules)
Adds rules to this style.
setDefaultStyle: function(style)
Sets the default style for this style object.
This class represents an SLD Rule, as being used for rule-based SLD styling.
Creates a UserStyle.
Close