# Layer Styling

# Styled Layer Descriptor (SLD)

# Generating SLDs

  1. open your source dataset in QGIS
  2. style the layer using the QGIS styling controls
  3. export the style to an SLD file
  4. include the SLD file with the GeoJSON file that you upload or sync

Creating SLD in QGIS
Creating SLD in QGIS

# Styling Options

Refer to our QGIS styling guide for vector layers:

Styling layers

Additional tips:

  • opacity must be defined in the colour - the layer's global opacity slider has no effect when exporting to SLD
  • for polygon features to be selectable, the fill opacity must be greater than 0 - it can be as little as 1%
  • for rule-based styles, field names are case-sensitive (even though in QGIS they are case-insensitive)
  • depending on the thickness of a line, the SLD file may need to be manually altered for dashed and dotted lines otherwise the gaps may disappear - eg. a 4 pixel thick line should be updated from <se:SvgParameter name="stroke-dasharray">1 2</se:SvgParameter> to <se:SvgParameter name="stroke-dasharray">4 8</se:SvgParameter>
  • when styling layers served from a Geoserver instance, it may be necessary to prefix mark well known names with shape:// in the sld. eg. <se:WellKnownName>shape://horline</se:WellKnownName> for more details refer to Geoserver's documentation. https://docs.geoserver.org/latest/en/user/styling/sld/extensions/pointsymbols.html#shape-symbols

# Symbols

Symbols can be chosen from any of the following:

Obtain the URL or icon name for the desired icon.

# Colours

Bubble symbols can be styled with any of the standard HTML colours listed at: