4

I am trying to set the x,y offset of layer labels based on a data defined override. What I'm trying is the following:

CASE
WHEN name is 'Brooklyn Bridge' [3.5, 0]
ELSE [-3.5, 0]
END

However this does not seem to be the correct syntax to set x and y values simultaneously. How would you do this?

  • 1
    also you have missed comma: ELSE [-3.5 0] -> ELSE [-3.5, 0] – Oto Kaláb Jan 27 '17 at 15:46
4

You just needed to use "=" instead of "is", surround your field name with "", and replace the () with '' around the offset values, see expression below:

CASE
WHEN "name" = 'Brooklyn Bridge' THEN '3.5, 0'
ELSE '-3.5, 0'
END

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