The custom style editor allows advanced styling of features and labels via Style Layer Descriptor (SLD) XML.
Available on all plans
This feature is currently in early beta. When using this feature on live maps, you should consider the following caveats:
- The custom style editor may not be capable of producing all SLD feature type styles.
- Using the editor may break your layer visualisation.
- Legend symbology may not match your custom style.
- The editor may change.
- Your custom style may change.
Notes on usage
- To use a custom style, select the Custom from the Style panel.
- When switching to Custom style, the SLD for the last selected style will display in the editor. Saving this style will convert the style to custom SLD, and it will no longer be editable via that style's GUI settings.
- If your XML is invalid, the style will not be saved and will revert to the last good version.
- To reset a style, switch to another style and configure any required style settings, then click SAVE.
What's possible with SLD?
The custom SLD styling opens up a wide range of powerful styling possibilities. From greater control over label placement, to complex scale-dependent styles (think line width variations), and reusing styles quickly across mutliple layers.
- Scale-dependent style rendering
- Custom label positioning
- Chaining attributes into longer labels
- Prioritisation of important feature labels based on an attribute such as population
- Line and polygon offsets
- Complex line styles including hatching, directional arrows, alternating and spaced symbols
- Custom heatmap colours
- and much more
The possibilities are limited only by your imagination.
A collection of simple SLD code samples can be found in Geoserver's SLD Cookbook.
Note that not all feature type styles, rules, filters, symbolizers, or parameters described in the SLD cookbook can be reproduced at this time.
- Found something that didn't work?
- Need specific rules, filters, symbolizers, or parameters?
- Experienced any bugs or strange behaviour?
- Have you used the custom editor to make an impressive style
Please let us know.