Follow

Show Labels at specific map level

In regular cases, you will want to make appear labels on the map at a specific level but when you zoom out you don't want to see all label on the map because they are not readable.

Note: You need to have the Mapfile syntax for maps privilege to access this feature.

Screen_Shot_2017-09-22_at_5.25.49_PM.png

The first thing to know is that each level of the map matches a map scale.  Here's all the map scale by level proposed in eVouala Platform.


Level 0 - 1/221,872,136
Level 1 - 1/110,936,068
Level 2 - 1/55,468,034
Level 3 - 1/27,734,017
Level 4 - 1/13,867,009
Level 5 - 1/6,933,504
Level 6 - 1/3,466,752
Level 7 - 1/1,733,376
Level 8 - 1/866,688
Level 9 - 1/433,344
Level 10 - 1/216,672
Level 11 - 1/108,336
Level 12 - 1/54,168
Level 13 - 1/27,084
Level 14 - 1/13,542
Level 15 - 1/6,771
Level 16 - 1/3,386
Level 17 - 1/1,693
Level 18 - 1/846
Level 19 - 1/423
Level 20 - 1/212

So the map scale of level 12 is 1/54,168 where 1 cm on the map is 54,168 cm ground.  You can configure the level where the label will appear on the map by editing the template of the layer, by using MAXSCALEDENOM and MINSCALEDENOM.  Here's an example of a polygon layer where the label will appear at level 13 and hide a level 17. 

CLASS
    NAME 'PID'
    STYLE
        OUTLINECOLOR '#2838a5'
        WIDTH 1
    END
    LABEL
         TEXT "[pid]"
         SIZE 7
         COLOR '#090909'
         OUTLINEWIDTH 2
         FONT 'mu'
         TYPE truetype
         MAXSCALEDENOM 28000
         MINSCALEDENOM 3300
    END
END

mapscale.gif 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk