IMapServerLegendClass Interface

Provides access to the Map Server Legend Class Interface.

When To Use

Use IMapServerLegendClass when retrieving legend elements including the symbol image, label and description of a single legend class. To export a single image of the legend use ExportLegend on IMapServerLayout.

Members

Name Description
Read-only property Description The description string.
Read-only property Label The label string.
Read-only property SymbolImage The symbol image.
Read-only property TransparentColor The transparent color used for the symbol image.

IMapServerLegendClass.Description Property

The description string.

Public ReadOnly Property Description As String
public string Description {get;}

IMapServerLegendClass.Label Property

The label string.

Public ReadOnly Property Label As String
public string Label {get;}

IMapServerLegendClass.SymbolImage Property

The symbol image.

Public ReadOnly Property SymbolImage As IImageResult
public IImageResult SymbolImage {get;}

Remarks

Use SymbolImage to retrieve the legend symbol image of a particular legend class. The SymbolImage is an ImageResult object. Properties of an ImageResult object include: Height, Width, URL and MimeData. The symbol image size is in pixels while a MapServer legend patch is measured in points.

IMapServerLegendClass.TransparentColor Property

The transparent color used for the symbol image.

Public ReadOnly Property TransparentColor As IColorDescription
public IColorDescription TransparentColor {get;}

Remarks

Transparency is only supported for image types that support transparency such as .png or .gif.

Classes that implement IMapServerLegendClass

Classes Description
MapServerLegendClass The Map Server Legend Class coclass contains settings about a legend class.

Remarks

Legends are associated with renderers that belong to each layer in a map. Each layer has a separate renderer. Each renderer has one or more legend groups. Each legend group has one or more legend classes. MapServerLegendClass objects are part of a MapServerLegendGroup object. MapServerLegendGroup objects are part of a MapServerLegendInfo object. MapServerLegendInfo objects are the result of the GetLegendInfo method on IMapServer .

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.