I am using 3.10 QGIS. I want to set the label view adjusting with map scale when zoom in zoom out.

Here is an example.

Picture 1

I want to make the zoom out, on the 2nd picture, label adjusting to the map scale so it should be smaller text size. How can achieve this?

Picture 2


Word of cartographic advice: Don't do this. Some things like house numbers (as in your example) are only meant to be displayed at large scales, not when zooming out. Everything else is bad practice, since it overloads and covers up the map, leads to colliding labels and is confusing in general.

As to your problem: In the image below you see the properties tab of a point layer.

enter image description here

Go to labeling and in the text sub-tab hit the rectangle with the triangles attached to it to the right of the size field, choose edit and enter the following:

WHEN @map_scale < 1000 THEN 10
WHEN (@map_scale >= 1000 AND @map_scale < 5000) THEN 8
WHEN (@map_scale >= 5000 AND @map_scale < 15000) THEN 6

This is a basic example of how to create scale-dependent text size. Obviously it needs tweaking so it fits your needs.

  • thanks mate, this solution is so perfect for my problem :D – sauki mufti Jul 3 '20 at 4:24

You could set the label size to map unit or to meter at scale, with this setting the text size is linked to the map scale. Note that you may get too small or too big label to still be readable when you zoom in or out, if that's a problem @Erik answer using scale dependent text size may be better.

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.