Styled Layer Descriptor (SLD) Example

vector, feature, sld, styling, style

Parsing SLD and applying styles to a vector layer.

This example uses a SLD file to style the vector features. To construct layers that use styles from SLD, create a StyleMap for the layer that uses one of the userStyles in the namedLayers object of the return from format.read(). Look at the sld.js source to see how this is done.

Select a new style for the WaterBodies layer below: