2

When I move my labels with the move label tool my double rule-based label is overlapping. I have tried to change the settings of its position but it is not possible to affect it once its moved.

Any ideas?

enter image description here

  • It seem to me that you are using two rule in order to get a two line label. if that's the case you could use a single label (based on your two field and formated on two line). – J.R Jul 11 at 11:50
2

When you use the move tool to move a label, changing its position using the label position options inside the properties will not have any effect. This is because the move tool uses x and y coordinates to fix its position based on the x and y coordinates identifies in the attribute table.

Personally, I rarely use the move tool to change label positions, I usually use conditional statements inside the Data Defined Override to control the labels' locations.

example

Here is an example:

CASE
  WHEN "FieldName" IN ('Name_1','Name_2') THEN 'T'
  WHEN "FieldName" IN ('Name_3','Name_4') THEN 'B'
ELSE 'TSL'
END

Where:

  • "FieldName" is the name of the field that you want to control the position of its labels
  • 'Name_1', 'Name_2', 'Name_3', and 'Name_4' are the labels that you need to change their positions
  • 'T' means top position
  • 'B' means bottom position
  • 'TSL' means top, slightly left position

The above statement says if the name of the labels are 'Name_1' or 'Name_2' put them at the top position, and if the name of the labels are 'Name_3' or 'Name_3' put them at the bottom position. Other labels put them at the top slightly left position.

There are 12 options to choose from to place your labels as you like, I am just showing a small sample.

If you want to use the above technique, you need to deactivate Coordinate X and Y shown in the above image which uses the positions defined in the attribute table.

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.