Maptitude GISDK Help |
Creates a new map window from a map that appears in a layout.
map_name = OpenMapFromAnnotation(string layout_name, integer id, array options)
Argument |
Contents |
layout_name |
The name of the layout containing the map |
id |
The ID of the map annotation in the layout |
Option |
Type |
Contents |
Activate Macro |
String |
The name of a macro called whenever the map window is activated |
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 |
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 function 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) |
Toolbar |
String |
The toolbar associated with the map window |
A string indicating the name of the new map.
The scale change macro runs whenever the map scale changes. This occurs when functions such as SetMapScope() or SetScale()) are called, or when the user resizes or reshapes the map window.
The position and size of the map window are expressed as percentages of the Maptitude frame.
The attached menu and toolbar are automatically displayed whenever the map is activated.
If the menu, toolbar, activate macro, close macro, or scale change macro is not specified, OpenMapFromAnnotation() uses the default specified with SetDefaults(). If a map specific default was not specified with SetDefaults() then OpenMapFromAnnotation() uses the generic default.
For a full list of GISDK functions for annotations, see Freehand Items (Annotations).
Error Type |
Meaning |
Error |
The map window could not be created |
NotFound |
The specified layout or map annotation does not exist |
Function |
Summary |
Closes a map window |
|
Creates a copy of a map |
|
Opens a map file and displays it in a map window |
|
Creates a new, empty map window. |
|
Saves settings for a map window to a file on disk |
|
Sets default menus, toolbars, and macros |
©2025 Caliper Corporation | www.caliper.com |