OpenLayers. Format.SLD

Read/Wite SLD.  Create a new instance with the OpenLayers.Format.SLD constructor.

Inherits from

Summary
OpenLayers. Format.SLDRead/Wite SLD.
Properties
defaultVersion{String} Version number to assume if none found.
version{String} Specify a version string if one is known.
namedLayersAsArray{Boolean} Generate a namedLayers array.
Constructor
OpenLayers. Format.SLDCreate a new parser for SLD.
Functions
writeWrite a SLD document given a list of styles.
readRead and SLD doc and return an object representing the SLD.

Properties

defaultVersion

{String} Version number to assume if none found.  Default is “1.0.0”.

version

{String} Specify a version string if one is known.

namedLayersAsArray

{Boolean} Generate a namedLayers array.  If false, the namedLayers property value will be an object keyed by layer name.  Default is false.

Constructor

OpenLayers. Format.SLD

Create a new parser for SLD.

Parameters

options{Object} An optional object whose properties will be set on this instance.

Functions

write

write: function(sld,
options)

Write a SLD document given a list of styles.

Parameters

sld{Object} An object representing the SLD.
options{Object} Optional configuration object.

Returns

{String} An SLD document string.

read

read: function(data,
options)

Read and SLD doc and return an object representing the SLD.

Parameters

data{String | DOMElement} Data to read.
options{Object} Options for the reader.

Returns

{Object} An object representing the SLD.

write: function(sld,
options)
Write a SLD document given a list of styles.
read: function(data,
options)
Read and SLD doc and return an object representing the SLD.
Create a new parser for SLD.
Read and write XML.
Close