I have trail data in shapefiles. Each trail record includes a "difficulty" field, and I would like to use this field to display a standard ski slope difficulty icon next to each trail. I have these icons as SVG files.

This seems like a labeling matter to me. I have, for example, use trail length fields to display the length next to the trail. And of course I have the trail name displayed as well. I would like to display difficulty, not as the numerical values of "1", "2", "3", or "4", but as a different SVG icon based on whether the trail's difficulty field is set to 1, 2, 3, or 4.

But I can't find a way to do this in QGIS 2.18, in which "labeling" seems focused on text data and it's formatting.

  • another option would be to use the svg as the label background
    – csk
    May 9, 2018 at 18:10

1 Answer 1


I'd recommend working with symbology instead of labeling, specifically using a marker line. The marker (in your case the trail SVG) can be placed at the center of the line as shown here:

enter image description here

enter image description here

(The screenshots are from an older version of QGIS but they show the general settings you'd be looking for.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.