Maptitude GISDK Help

SetLegendSettings()

Summary

Change the settings for a map legend.

 

Syntax

SetLegendSettings (string map_name, array settings)

 

Argument

Contents

map_name

The name of the map

settings

Required information about the legend (see table below)

 

The array of five elements containing the legend settings:

 

Settings Element

Type

Contents

1

String

Type of legend ("Automatic", "Manual" or "None", where "None" creates a legend based on the given settings and options but does not display it)

2

Array

Six flags indicating the legend contents (see table below)

3

Array

Three flags indicating legend style (see table below)

4

Array

Four font strings indicating the font to use for the legend title, footnote, subtitles and items

5

Array

Two strings containing the legend title and footnote

 

The seven flags in the second element indicate the legend contents:

 

Contents Flags

Type

Contents

1

Integer

Whether to display a title (1 or 0)

2

Integer

Whether to display a footnote (1 or 0)

3

Integer

Whether to display layer information (1 or 0)

4

Integer

Whether to display set information (1 or 0)

5

Integer

Whether to display theme information (1 or 0)

6

Integer

How to display the scale of miles (0 for none, or 1-6 indicating the style to use)

7

Integer

Whether feature display settings are displayed (1 or 0)

 

The three flags in the third element indicate the legend style:

 

Style Flags

Type

Contents

1

Integer

Whether the legend is attached to the map or in a separate window (1 or 0)

2

Integer

Whether the legend is framed (1 or 0)

3

Integer

Whether the background is filled (1) or transparent (0). If the background is filled (the default), a background style and background color must be specified as options in the options array

 

Error Codes

Error Type

Meaning

Error

The settings array is empty or 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

GetLegendOptions()

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

GetLegendSettings()

Gets the settings for a map legend

CreateLegend()

Creates a map legend

 

 

©2025 Caliper Corporation www.caliper.com