Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

MapServer allows you to define styles for features.  These can be stacked on top of each other.  Common simple style settings are:

...

Code Block
titleANNOTATION
CLASS
      LABEL
         FONT "arialbd"
         TYPE TRUETYPE
         COLOR 0 0 0
         OUTLINECOLOR 255 255 255
         SIZE 10
         POSITION cc
         ANTIALIAS TRUE
      END
END

 

If the symbol that you wish to use is quite large it is advisable to offset it in order for the “PointInfo” search to return the correct results. Normally the symbol will be placed with the top left hand corner at the coordinates of the point. If a user then clicks on the centre of the actual symbol this may not fall within the “PointInfo” tolerance (defined in the webconfig - <add key="MapPixelTolerance" value="10"/>) and incorrect or no results may be returned.

Code Block
titleSYMBOL OFFSET
CLASS
      STYLE
         SYMBOL "speedcamera"
            OFFSET -5 -5
      END
END