Skip to content

Style a layer in QGIS

When the map loads, Groundwork converts your QGIS styling automatically. You do not need separate style files. Set the style of each layer in Layer Properties → Symbology and Layer Properties → Labels, as you do for QGIS Desktop.

In the QGIS User Guide: Symbology Properties, The Symbol Selector and Labels Properties.

What Groundwork draws

Groundwork draws these parts of a QGIS style:

QGIS stylingWhat Groundwork draws
A Single Symbol, Categorized, Graduated or Rule-based styleThe layer in that style. A rule that you limit to a scale range draws only in that range
A Simple Marker, an icon from the built-in QGIS library, or an SVG that you embed in the projectThe point symbol, with its shape, fill colour, size, rotation and outline. A symbol with several symbol layers draws all of them
An SVG Marker from a web address, set with From URL…The icon, with its colour placeholders filled. An icon from Maki, Temaki or another icon set on jsDelivr is drawn in the Fill color
A Simple Line, and a Marker Line placed On last vertexThe line, with its colour, width and dash pattern, and the arrowhead at the end of the line
A Simple Fill, a fill with No Brush, or a Point Pattern FillThe fill colour and the outline, only the outline, or the marker across the polygon
A Data-defined override on the fill colour or stroke colour of a simple marker, line or fill, that reads a fieldEach feature in the colour that its field holds, such as #2ca02c. A blank value, or a value that is not a colour, draws the fixed colour
That override as set_color_part("color", 'alpha', 38)The colour of the field at the opacity that the number sets, from 0 to 255
Single Labels and Rule-based LabelingLabels from a field or from an expression such as "street" || ', ' || "suburb". Groundwork reads the font, size, colour, text buffer, a simple offset and the Overlapping labels setting
A Data-defined override on the Color of a label’s text, that reads a fieldEach label in the colour that its field holds. A blank value, or a value that is not a colour, draws the fixed colour
Functions and operators in a label expressionThe ones in Write expressions in QGIS
Legend placeholder image, embedded with Embed File…That image in place of the legend, while the layer draws its own style. A fully transparent image shows no legend

A categorised style also gives the layer its legend and the values that users can filter by. For example, trees coloured by a species field get a species legend and a species filter.

To show a picture of your own in place of the legend, set a Legend placeholder image in Layer Properties → Legend. Choose Embed File… in the menu beside it, so that the image is saved in the project. A fully transparent image shows no legend, as in the annotation template. Users can then filter by the style’s field from the Filter button. If a user chooses another style in Groundwork, its legend comes back.

Set every size, width and dash length in millimetres. Groundwork reads a value in points, inches or map units as a number of screen pixels, and the result is wrong.

Groundwork draws a fill with the opacity your style gives it. A fill with a fully opaque colour is solid and hides the basemap below it. Set the opacity of the fill colour in QGIS if you want the basemap to show through. Groundwork also reads the layer’s own opacity.

What Groundwork adds to a style

Groundwork adds some things where your style leaves them out, so that the layer shows clearly on the basemap. A point symbol with no outline gets a thin white outline. A label with no text buffer gets a thin white halo. To stop these additions, give the symbol an outline and the label a text buffer.

In the QGIS User Guide: Categorized Renderer, Rule-based Renderer, Unit Selector for millimetres, and Formatting the label text for the font and text buffer.

Use an icon from an icon set

For a point symbol such as a toilet, a seat or a barbecue, use an icon from Maki. Maki is a free set of icons drawn for maps, so the icons stay clear at the size of a point. Where Maki has no icon, such as a seat, use Temaki, which is drawn to match it.

  1. Find the icon and note its name, such as toilet.
  2. In Layer Properties → Symbology, select the symbol layer and set its Symbol layer type to SVG Marker.
  3. In the menu beside the SVG path, choose From URL….
  4. Enter the address of the icon on jsDelivr, such as https://cdn.jsdelivr.net/npm/@mapbox/maki@8/icons/toilet.svg. For Temaki, use an address such as https://cdn.jsdelivr.net/npm/@rapideditor/temaki@5/icons/bench.svg.
  5. Set the Fill color and the Size.

Groundwork draws the icon in its Fill color, so each category of a style can have its own colour. QGIS cannot change the colour of these icons, so QGIS Desktop does not show the Fill color on them.

In the QGIS User Guide: SVG Marker.

What to use in place of other styles

If Groundwork cannot read the style of a layer, it uses a colour from a fixed palette for that layer. The layer still loads, shows in the list and accepts edits as usual. Do not use these styling features:

QGIS stylingWhat Groundwork drawsUse instead
A Font Marker, Filled Marker, Raster Image Marker or Ellipse MarkerThe full layer in a palette colourA simple marker, or an icon from the built-in QGIS library
An SVG Marker from your own fileA plain marker in the same colourAn icon from the built-in QGIS library, or an icon from a web address
An Arrow, Hashed Line or other decorated line (a Marker Line on the last vertex draws its arrowhead)A plain lineA simple line
A preset Stroke style of a line, such as Dash LineA small, fixed pattern on the screenUse custom dash pattern, with a pattern in millimetres. It is correct at any width
A simple fill with any Fill style other than Solid or No BrushSolid black. If the Stroke style is No Line, nothingA solid fill, or No Brush for polygons with only an outline
No Symbols, Heatmap, Point Displacement, Point Cluster, Merged Features, Inverted Polygons or 2.5 DNothing on the map. The features still show in the list, and users can still edit themA single-symbol, categorised or graduated style
A rule condition with a variable such as @layer_name, or a function that Groundwork does not readThat rule’s symbol on every feature, because Groundwork cannot read its conditionA condition that compares fields with values, with the operators and functions that a label expression can use
A label expression with a function that Groundwork does not read, callouts or other placement settingsNone of these settingsA label’s field, or an expression such as "street" || ', ' || "suburb", from single labels or from label rules. Groundwork reads its font, colour, text buffer, a simple offset and the Overlapping labels setting
A Legend placeholder image that names a file or a web addressThe legend of the styleThe same image, embedded with Embed File…

Groundwork also ignores symbol levels, blend modes and data-defined overrides, except a colour that comes from a field, for a symbol or a label.

Check the map in Groundwork

Before you share the map, open it in Groundwork. The map loads but looks different from QGIS tells you the cause of each problem. Fix the problem in QGIS: change the style, and save the project over the published one. The next person who opens the map gets the new version.

Next: Set up the edit form in QGIS.