Maptitude GISDK Help

GetLegendOptions()

Summary

Gets the values of one or more options for a map legend.

 

Changes

In Version 5.0 added Locked option.

 

Syntax

opts = GetLegendOptions(string map_name, array options)

 

Argument

Contents

map_name

The name of the map

options

An array of option strings

 

Returns

An array of values that correspond to the input array of strings.

 

Notes

Option

Type

Contents

Layers Label

String

Text for the layer information subtitle (defaults to "Map Layers")

Layers Label Flag

Boolean

Whether to display Layers Label

Click Macro

String

Macro to run when the user double-clicks on a legend that is in its own window (use annotation handling for legends that are attached to the map)

Background Color

Color

Color of the legend background

Background Style

Fillstyle

Fill style of the legend background

Border Color

Color

Color of the legend frame

Border Style

Linestyle

Line style of the legend frame

Border Width

Integer

Width of the legend frame

Title Color

Color

Color of the title font

Footnote Color

Color

Color of the footnote font

Headings Color

Color

Color of the headings (subtitles) font

Standard Color

Color

Color of the standard (items) font

Scale Color

Color

Color of the scale bar

Columns

Integer

Number of legend columns (default=1)

Column Order

String

Rows to order items across rows or Columns to order items down columns

Locked

Boolean

If "True" the close box on legends in a separate window is disabled; the default is "False"

 

Example

leg = GetLegendOptions("New York Map", {"Background Color","Border Color"})

 

Error Codes

Error Type

Meaning

Error

The option strings array is null, or one of the items is invalid

NotFound

The named map does not exist or has no legend

 

See Also

Function

Summary

SetLegendOptions()

Changes the option settings for a map legend

SetLegendSettings()

Changes the settings for a map legend

GetLegendSettings()

Gets the settings for a map legend

 

 

©2025 Caliper Corporation www.caliper.com