I am using QGIS v3.2 "Bonn".

I currently have symbols that have labels and call-out lines created using the geometry generator. I can make the labels follow scale dependent visibility rules, and would like to have the call-out lines follow the same rules but haven't found a way to do so.

Is there a way to set scale dependent visibility for such objects? Below is the geometry generator interface.

Geometry generator interface

  • 1
    What about using an if statement in your expression which only generates the objects if they're within a certain map scale threshold: e.g. if(@map_scale < 10000, make_line(...), None)
    – Joseph
    Aug 9, 2019 at 14:17
  • 1
    @Joseph Thanks, that worked for me! Should I create an answer with that code?
    – Fragilaria
    Aug 9, 2019 at 16:41
  • 1
    It would be great if you did! :)
    – Joseph
    Aug 12, 2019 at 13:04

1 Answer 1


Thanks to Joseph for the suggestion, by adding an if statement to the code I was able to accomplish what I was trying to do.

Code for the geometry generator is as follows:

if(@map_scale < 200000, 
    make_point($x, $y),
    make_point(("auxiliary_storage_labeling_positionx"), ("auxiliary_storage_labeling_positiony"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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