OpenLayers.Format.SLD - OpenLayers

# OpenLayers.Format.SLD

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

#### Inherits from

- OpenLayers.Format.XML.VersionedOGC

Summary

OpenLayers.Format.SLD | Read/Write SLD.
Properties |
profile | {String} If provided, use a custom profile.
defaultVersion | {String} Version number to assume if none found.
stringifyOutput | {Boolean} If true, write will return a string otherwise a DOMElement.
namedLayersAsArray | {Boolean} Generate a namedLayers array.
Functions |
write | Write a SLD document given a list of styles.
read | Read and SLD doc and return an object representing the SLD.

### Properties

### profile

{String} If provided, use a custom profile.

#### Currently supported profiles

- GeoServer - parses GeoServer vendor specific capabilities for SLD.

### defaultVersion

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

### stringifyOutput

{Boolean} If true, write will return a string otherwise a DOMElement. Default is true.

### namedLayersAsArray

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

### Functions

### write

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 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.

Read/Write SLD.
Base class for versioned formats, i.e.
Close