GeoJSON Embedded Styling and Labelling

Geojson datasets can have embedded styling information.  

This provides the dataset owner the option of managing the styling by creating and populating predefined attributes, to the extent that each feature can be optionally uniquely styled.

The following styling features are available, with the styling attribute names to be created by the user contained in the square brackets (there are often a couple of options for the attribute name).

So for example, to set the marker colour of a point layer you would create an attribute called either 'marker-color' or 'style-color', and populate it with a #colour.  Of course, each feature can have it's own colour.

Points:

    markerColorHex = ['marker-color', 'style-color']       
    markerOpacity  = ['marker-opacity', 'style-opacity']    
    markerSize     = ['marker-size', 'style-size']          
    markerSymbol   = ['marker-symbol', 'style-symbol']      (options are 'circle', 'square', 'diamond', 'triangle', 'hexagon', 'star', 'heptagon')
    markerURL      = ['marker-url']

Lines:

      lineDash    = ['lineDash']
      strokeWidth   = ['style-width']
      strokeHex     = ['stroke', 'style-color']
      strokeOpacity = ['stroke-opacity', 'style-opacity']
      strokeWidth   = ['stroke-width', 'style-width']

    // White halo
    strokeOutlineHex     = ['style-outline-color']
    strokeOutlineOpacity = ['style-outline-opacity']
    strokeOutlineWidth   = ['style-outline-width']

Polygons:

    strokeHex     = ['stroke', 'style-color']
    strokeOpacity = ['stroke-opacity', 'style-opacity']
    strokeWidth   = ['stroke-width', 'style-width']
    fillHex       = ['fill', 'style-fill-color']
    fillOpacity   = ['fill-opacity', 'style-fill-opacity']

    // White halo
    strokeOutlineHex      = ['style-outline-color']
    strokeOutlineOpacity  = ['style-outline-opacity']
    strokeOutlineWidth    = ['style-outline-width']

Geojson datasets can also have embedded labelling, as well as label styling information.  

This provides the dataset owner the option of managing the labelling, as well as the styling of it, by creating and populating predefined attributes.

Labelling attribute: "label"

The attribute in the dataset named "label" will be used to label features on the map.  If the attribute "label" does not exist in the dataset, it can be added in the VRT.

Label Styling attributes:

labelColor
labelAlign
labelBaseline
labelOffsetX
labelOffsetY
labelPlacement
labelMaxangle
labelOverflow
labelRotation
labelWeight
labelSize
labelFont