2

Is there I can define expression for the placement of label in vector layer like when the scale is less than x label placement should be curved else it should be horizontal.

I am using Pal setting. I have following setting for the vector layer.

self.setCustomProperty('labeling/placement', '3')

Is there any way I can write expression for this like CASE $scale < 10000 THEN curved ELSE Horizontal END

placement is enum{Parallel, curved, horizontal} so its '3' in settings

  • Could you please edit your post and add a copy of the expression you have written? – wiltomap Apr 3 '15 at 13:09
  • placement in the label does not allow me to write expression – Nikhil Murarka Apr 3 '15 at 13:13
  • I don't understand your problem, then... Do you mean you get an error message after you write the expression or that you just can't launch the 'Expression dialog'? Have you proceeded like this: 1. select your layer in the canva, 2. click onto 'Layer labelling options' button, 3. click the option 'Label this layer with' and 4. click the expression dialog button to launch the Expression dialog. – wiltomap Apr 3 '15 at 13:22
  • I do this steps but using "Label this layer" expression i can express what field i need to be displayed at that particular layer but i cannot control the placement of this field label. I am not sure If can write expression to control placement for label in "Label this layer with". – Nikhil Murarka Apr 3 '15 at 13:34
  • You can set the placement of the label in the menu inside the 'Layer labeling settings' dialog: Text, Formatting, Buffer, Background, Shadow, Placement and Rendering. The 'Placement' menu will help you doing what you need, I guess. – wiltomap Apr 3 '15 at 13:45
1

The 'Placement' menu inside the 'Layer labeling settings' dialog might help you:

enter image description here

  • See for the distance we can define the expression but we cannot define the expression for the placement (around the point or offset from the point) – Nikhil Murarka Apr 3 '15 at 14:19
0

I asked this on the Mailing list and One of the developer said currently the data Defined expression cannot be written for the placement as there was no demand for this feature.

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.