0

I would like to set a white buffer around labels in a mapfile (Mapserver version 6.2.1). In the official documentation, I can't find a specific parameter for this... I have tried the SHADOWCOLOR and SHADOWSIZE parameters but if set with a OFFSET 0 0, the shadow is not visible (it has to be offsetted, which I don't want to).

Here is an extrat of my code, to be completed if you have ideas on this issue:

    CLASS
        NAME "myLayer"
        EXPRESSION ([code] = 1)
        STYLE
            SYMBOL "STD_circle"
            COLOR 0 255 0
        END
        LABEL
            FONT "vera"                 
            TYPE TRUETYPE
            SIZE 3
            COLOR 0 0 0
            BUFFER 2
        END
    END
1

Here is the solution, found myself, and not obvious at all in the documentation: add a OUTLINECOLOR to the LABEL tags!

CLASS
    NAME "myLayer"
    EXPRESSION ([code] = 1)
    STYLE
        SYMBOL "STD_circle"
        COLOR 0 255 0
    END
    LABEL
        FONT "vera"                 
        TYPE TRUETYPE
        SIZE 3
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        BUFFER 2
    END
END
  • Have you any experience with the difference between Buffer and Outline-color/width? – MichaelR Aug 9 '17 at 11:03

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.