MapServer / MapServer-documentation

Source repository for the MapServer documentation, for the live website. Please submit pull requests to the 'main' branch.
https://mapserver.org
Other
34 stars 68 forks source link

Undocumented STYLE POSITION keyword #462

Open geographika opened 3 years ago

geographika commented 3 years ago

The STYLE page (https://mapserver.org/mapfile/style.html) is missing the keyword POSITION

See: https://github.com/MapServer/MapServer/blob/1dd7b072be5aa307d9dcb120dd2fa7f3f0dd041b/mapfile.c#L2578 and https://github.com/MapServer/MapServer/blob/1dd7b072be5aa307d9dcb120dd2fa7f3f0dd041b/mapfile.c#L2810

geographika commented 3 years ago

On further investigations I'm not sure if this keyword has any effect. It is read and written to Mapfiles as part of the STYLE object but I can't find any references to style->position in the code.

I've set it in a test Mapfile and it doesn't change the styling of a point. I thought it may be a LABEL specific style setting but various combinations of below don't change anything to the image output.

This may be something to remove from the codebase rather than document.

LAYER
    NAME "center"
    TYPE POINT
    STATUS on
    CLASS
        STYLE
            COLOR 0 0 255
            SIZE 30
            WIDTH 1
            SYMBOL "circle"
        END

        LABEL
            TEXT "UL"
            FONT "default"
            TYPE truetype
            SIZE 10
            STYLE
                #GEOMTRANSFORM LABELPNT
                SYMBOL 'circle'
                COLOR 255 0 0
                SIZE 10
                POSITION UL
            END
        END

        LABEL
            TEXT "UR"
            FONT "default"
            TYPE truetype
            SIZE 10
            STYLE
                #GEOMTRANSFORM LABELPNT
                SYMBOL 'circle'
                COLOR 0 255 0
                SIZE 20
                POSITION UR
            END
        END

    END

    FEATURE POINTS 50 50 END END
    FEATURE POINTS 200 200 END END
END

image