Maptitude GISDK Help

SaveLegendToImage()

Summary

Saves a legend in a separate window to an image file.

 

Changes

TIFF and GIF image types added to Version 6.0/2012.

 

Syntax

SaveLegendToImage(string map_name, string file_name, string type, array options)

 

Argument

Contents

map_name

The map of the legend to be saved, or null for the current map

file_name

The path and file name of the image file to be created

type

Type of image file: "JPEG", "BITMAP", "TIFF", "GIF", or "PNG" (not case sensitive)

 

Option

Type

Contents

Quality

Integer

Quality of the JPEG image. The higher the quality setting, the larger the resulting JPEG files. The default quality is 80.

Popup Border

Boolean

Whether or not to put a border around the legend.

 

Notes

Example

SaveLegendToImage("My Map", "c:\\images\\legend1.jpg", "JPEG", {{"Quality", 70}} )

 

Error Codes

Error Type

Meaning

Error

Error writing to disk (e.g., out of disk space)

NotFound

The specified map does not exist

 

See Also

Function

Summary

SaveMapToImage()

Saves the contents of the map window to an image file

 

 

©2025 Caliper Corporation www.caliper.com