MapServerLegendPatch

A class containing information on a legend patch (swatch).

Property

Type

Description

AreaPatch

AreaPatch

The legend patch polygon.

Height

double

The height in pixels.

ImageDPI

double

The print resolution (pixels per inch) of the canvas on which the image patch will be drawn. Used to define the display scale of the patch symbol.

LinePatch

LinePatch

The legend patch polyline.

Width

double

The width in pixels.

Remarks

A legend patch is a rectangular image with an individual polygon, line or point symbol associated with a particular legend class. Use Height and Width to change the size of the legend patch. Use AreaPatch or LinePatch to change the shape of the symbol. You can assign a custom shape to the symbol such as a triangle or rounded polygon or assign a custom line shape to the symbol such as a zigzag line.

If the goal is only to change the size of the patch and to retain the default shape, AreaPatch does not have to be set. Changing the size of the legend patch will not change the size of the symbol; it only changes the size of the patch surrounding the symbol. The size of the symbol is determined by the properties of the symbol itself.

11/8/2016