1

In QGIS 3.8 (Win 10) I have a Point-Layer with labels in a certain distance and leader lines, created with geometry-generator. The leader lines in some cases cross below the label and are masked by a text-buffer in white. However, some of the labels are above the sea - so in these cases, it would be better not to have a white buffer. I tried to make the buffer in blue by defining the color with data-defined override and using the following expression:

if (("NAME" = 'name 2a' or "NAME" = 'name 3' or "NAME" = 'name 3a' ),blue, white)

However, the color does not change. I also tried to add the color-code in hex (#65baf2 instead o blue and #ffffff instead of white), but with the same result. How can I set different buffer-style for certain labels?

See screenshot: enter image description here

  • 1
    Write the color in '. E.g. 'blue' or '#ffffff' – MrXsquared Sep 22 at 14:54
  • OK, so simple! Yes, that works, tanks! – babel Sep 22 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.