[mapserver-users] Road shields on Mapserver 7
lars.schylberg at blixtmail.se
lars.schylberg at blixtmail.se
Thu Feb 23 12:15:36 PST 2017
Hi,
I more detail in my previous example the offset in the style block is because the example is part of a block with three road shields stacked.
/Lars S.
One single shield would be like this:
LABEL
EXPRESSION ('[VAGNR1]' ~ '^[0-9][0-9]$' )
# Blue two digits
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX
COLOR 64 168 217
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION cc
COLOR 255 255 255
SIZE 7
# FORCE: TRUE
REPEATDISTANCE 150
MINDISTANCE 300
PRIORITY 2
END
-----Originalmeddelande-----
Från: lars.schylberg at blixtmail.se
Till: mapserver-users at lists.osgeo.org
Datum: 2017-02-23 21:04
Ämne: Re: [mapserver-users] Road shields on Mapserver 7
Hi,
This is how I do it in MS7.0. This is just part of the class with the first two labels. I have different shield depending on the number of digits.
I also have different color depending on the color of the shield. This is following European road label standard.
/Lars S
CLASS
EXPRESSION ("[VAGNR1]" ~ "^[E0-9]*$" AND "[VAGNR2]" ~ "^[E0-9]*$" AND "[VAGNR3]" ~ "^[E0-9]*$" )
LABEL
EXPRESSION ('[VAGNR1]' ~ '^E.$')
# first shield - green - one digit
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX
COLOR 115 179 115
OFFSET 0 -13
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION CC
COLOR 255 255 255
SIZE 7
OFFSET 0 -13
REPEATDISTANCE 100
MINDISTANCE 100
PRIORITY 9
FORCE GROUP
END
LABEL
EXPRESSION ('[VAGNR1]' ~ '^E..$')
# first shield - green - two digits
STYLE
GEOMTRANSFORM "labelpnt"
SYMBOL VAGNRBOX_3TKN
COLOR 115 179 115
OFFSET 0 -13
SIZE 10
END
TEXT '[VAGNR1]'
FONT 'sc'
TYPE truetype
POSITION CC
COLOR 255 255 255
SIZE 7
OFFSET 0 -13
REPEATDISTANCE 100
MINDISTANCE 100
PRIORITY 9
FORCE GROUP
END
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170223/33691488/attachment.htm>
More information about the MapServer-users
mailing list