Maptitude GISDK Help

CreateMap()

Summary

Create a new, empty map window.

 

Syntax

actual_name = CreateMap(string map_name, array options)

 

Argument

Contents

map_name

The name you want to use for the map

 

Option

Type

Contents

Activate Macro

String

The name of a macro that is called whenever the map is activated

Annotation Menu

String

The context menu when clicking on an annotation and only one annotation is selected

Annotations Menu

String

The context menu when clicking on an annotation and more than one annotation is selected

Auto Project

Boolean

If "True" the map projection is chosen automatically, based on the current scope and scale; if False projections are not automatically changed

Close Macro

String

The name of a macro called when the user closes the map from the system menu

Context Menu

String

The context menu when clicking on a map and not on annotations

Done Macro

String

The name of a macro that is called after the window is closed

Locked

Boolean

If "True" the Close option does not appear in the system menu; if "False" the Close option does appear

Menu

String

The menu associated with the map window

Position

2 integers

The screen location of the window (x, y)

Scale Change Macro

String

The name of a macro called whenever the scale or scope of the map changes

Scope

Scope

The initial (default) scope of the map

Size

2 integers

The screen size of the window (x, y)

Title

String

The map window title

Toolbar

String

The toolbar associated with the map window

 

Returns

A string containing the actual name of the map.

 

Notes

Example

// Get the scope of a geographic file

folder = RunMacro("G30 Tutorial Folder")

info = GetDBInfo(folder + "states.cdf")

scope = info[1]

// Create a map using this scope

map = CreateMap("My Empty Map", {

     {"Scope", scope},

     {"Auto Project", "True"},

     {"Position", 100, 150}

     })

 

Error Codes

Error Type

Meaning

Error

Unable to create the map window

 

See Also

Function

Summary

AddAnnotation()

Adds an annotation to a map or layout window

AddCDFLayer()

Adds a layer from a compact format geographic file to a map

AddImageLayer()

Adds an image layer to a map

AddLayer()

Adds a layer from a standard geographic file to a map

DuplicateMap()

Creates a copy of a map

OpenMap()

Open a map file and display it in a map window

SetDefaults()

Sets default menus, toolbars, and macros.

 

 

©2025 Caliper Corporation www.caliper.com