In Main Properties tab -> Scale -> Data Defined Override
, you need to write the following expression:
case
when @map_scale < 5000 then 5000
else @map_scale
end
The above means that if the scale that fits the feature is less than 5000
then use the scale of 5000
, and if the scale that fits the feature is more than 5000 then use the best fit.
The above expression will prevent the scale to zoom in more than 5000
.
For example, I am using data from Natural Earth Data (UK Boundary) to test the above expression (but for this case I used a scale of 50,000
):
Without the above expression, the best fit for Bristol County is 39,688
as you can see below:
After applying the above expression with 50,000
instead of 5000
(as in your case), Bristol County zoomed out to 50,000
and it cannot be zoomed in less than the defined scale: