When viewing this map at near scales (eg. close to ground), the lines will scale to a real-world width of 10m. At far zoom levels, the line will reduce to a 1px stroke, making dense lines easy to distinguish without collapsing or disappearing.

Zoom in deep on this map to see the lines scale.

To use this style on a line layer, simply copy the code below, open your layer editor, switch the style to Custom SLD, and paste in the code. To adjust the width of the line, simple change the value for "stroke-width".

<p><?xml version="1.0" encoding="UTF-8"?> 
 <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0"> 
  <sld:Name>10m roads</sld:Name> 
  <sld:Name>10m roads</sld:Name> 
   <sld:Name>10m roads</sld:Name> 
    <sld:LineSymbolizer uom="http://www.opengeospatial.org/se/units/metre"> 
      <sld:CssParameter name="stroke">#38A800</sld:CssParameter> 
      <sld:CssParameter name="stroke-width">10</sld:CssParameter> 
      <sld:CssParameter name="stroke-linejoin">round</sld:CssParameter> 
      <sld:CssParameter name="stroke-linecap">round</sld:CssParameter> 

Learn more about scaling symbology with ground units.

Scaling map symbology with real world ground units

Feature Info