/
Using Dynamic Legends

Using Dynamic Legends

5.4.0+

The following screenshot shows a how a dynamic legend has been created for Geology at Mole Valley.

In order to use Dynamic Legends you must make sure that you have configured the following:

  • MapServer must be enabled for WMS support - please refer to WMS .MAP Configuration for details.
  • If you don't already have a LEGEND section in your map file then you will need to add it e.g.


LEGEND Configuration
 LEGEND
    IMAGECOLOR 255 255 255
    KEYSIZE 20 10
    KEYSPACING 5 5
    LABEL
      SIZE MEDIUM
      TYPE BITMAP
      BUFFER 0
      COLOR 0 0 0
      FORCE FALSE
      MINDISTANCE -1
      MINFEATURESIZE -1
      OFFSET 0 0
      PARTIALS TRUE
    END
    POSITION LL
    STATUS OFF
  END

  • In Studio the Legend Image entry for the Layer must be the following images/legend/blank.gif.
  • The .map file needs to be edited to include a NAME entry for each CLASS in the LAYER e.g.


Extract from .map file
      CLASS
      Expression "CHLK"
      NAME "Chalk"
         STYLE   
            OUTLINECOLOR 0 0 0
            WIDTH 2
            OPACITY 60
         END   
         STYLE   
            COLOR 200 255 175
            OPACITY 80
         END
      END
 
      CLASS
      Expression "CSDS"
      NAME "Calcareous sandstone"
         STYLE   
            OUTLINECOLOR 0 0 0
            WIDTH 2
            OPACITY 60
         END   
         STYLE   
            COLOR 220 220 200
            OPACITY 80
         END
      END
 
      CLASS
      Expression "CBIS"
      NAME "Clayband ironstone"
         STYLE   
            OUTLINECOLOR 0 0 0
            WIDTH 2
            OPACITY 60
         END   
         STYLE   
            COLOR 0 0 100
            OPACITY 80
         END
      END
 
      CLASS
      Expression "LMST"
      NAME "Limestone"
         STYLE   
            OUTLINECOLOR 0 0 0
            WIDTH 2
            OPACITY 60
         END   
         STYLE   
            COLOR 85 115 0
            OPACITY 80
         END
      END

Related content

Classic Layer Configuration
Classic Layer Configuration
More like this
Thematic Layer Configuration
Thematic Layer Configuration
More like this
MapServer LAYER>CLASS>EXPRESSION Object
MapServer LAYER>CLASS>EXPRESSION Object
More like this
MapServer LAYER>CLASS Object
MapServer LAYER>CLASS Object
More like this
Update .MAP file for NHS Choices Classic Layers
Update .MAP file for NHS Choices Classic Layers
More like this
Map Categories
Map Categories
More like this