4

I am finding when I use label vector lines using the newer labeling tool that the labels always appear on top of the lines of that layer. And they appear on top of all other layers in my project. Is there a way to have these labels lower down (i.e. not on top of other layers).

Thanks, David

  • Is there anything new ? I'm intersted in it. – Eliasse Jan 22 at 15:34
1

No that's currently not possible. Labels are always on top.

An ugly solution is to save the layers you want in the back to an image ("Save as image") and load that image back into QGIS - then overlay the things you want to be on top.

  • Thanks for the quick response. I appreciate as well your workaround. Like you said a little ugly so I will only use it if I really need to. Is there a way I can add this as a request for future builds of QGIS? – David Jan 10 '13 at 20:13
  • 2
    @David, the existing feature request #5628 "optional "Layer Order" entries for Labels and Diagrams" looks to be the same (or very similar) to what you are requesting. Since it is marked as unplanned, I suppose if it is really important to you, you could always consider funding it as a project. – RyanKDalton Jan 10 '13 at 20:49
1

It is not possible in a straight-forward way. You can, though, achieve a similiar result without tampering with the layer/label stacking order.

My example refers to a question marked as a duplicate. The person asking said question had three layers: a base layer, a point layer which served for labelling, and a semi-transparent mask layer; in this order from bottom to top. They wanted the labels to be affected by the semi-transparent mask layer.

original situation

My approach uses the “join by location” tool from the Processing tool box to assign an extra attribute to the label layer, which later allows us to style the labels in a rule-based manner (the ones “behind” the mask being transparent themselves)

EDIT: I assume that your polygon layer has a column describing whether the mask is applied for the current feature or not. This column is the attribute you want to transfer in the join by location step. In my case the column is called masked and contains the values 0 and 1, respectively. You can also use any existing attribute of the polygons, just be sure to refer to the right attribute when you create the rules for styling the output layer (last step)

join by location

rule-based label styles

The results look like that: final

Your Answer

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

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