Maptitude GISDK Help |
Returns the definition of an annotation.
Added Temporary option to Version 6.0/2012.
def = GetAnnotation(string window_spec, integer id)
Argument |
Contents |
window_spec |
Window type and name |
id |
Annotation ID |
An array of three elements defining the annotation.
Element |
Type |
Contents |
1 |
String |
The type of annotation |
2 |
Array |
The array of specifications (name-value pairs) that define the annotation |
3 |
Array |
An array of specifications (name-value pairs) that indicate whether the annotation is Editable and Protected |
Annotation Type |
Window Type |
Valid Specifications |
Bitmap |
Layout, map |
Color, Editable, File, Location |
Compass |
Map |
Color, Editable, Font, Index, Location |
Container |
Layout |
Editable, Location |
Editor |
Layout |
Color, Drop Shadow, Fill Color, Fill Style, Font, Line Color, Line Style, Line Width, Location, Name |
Ellipse |
Layout, map |
Angle, Editable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Location |
Figure |
Layout |
Drop Shadow, Line Color, Line Style, Line Width, Location |
Font Character |
Layout, map |
Angle, Color, Editable, Font, Index, Location |
Label |
Map |
All the options appropriate for text |
Legend |
Layout, map |
Editable, Location, Name |
Map |
Layout |
Editable, Fixed Scale, Line Color, Line Style, Line Width, Location, Map, Scope |
Polygon |
Layout, map |
Editable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Points |
Polyline |
Layout, map |
Editable, From Arrow, Line Color, Line Style, Line Width, Points, Smooth, To Arrow |
Rectangle |
Layout, map |
Angle, Editable, Fill Color, Fill Style, Line Color, Line Style, Line Width, Location, Rounded |
Splined Text |
Layout, map |
Editable, Points, Font, Color, Text |
Text |
Layout, map |
Angle, Color, Editable, Font, Framed, Frame Border Color, Frame Border Style, Frame Border Width, Frame Fill Color, Frame Fill Style, Frame Shield, Frame Type, Location, Text |
Specification |
Type |
Contents |
Angle |
Real |
The counter-clockwise rotation angle from horizontal |
Auto-Wrap |
Boolean |
Indicates whether text is automatically wrapped into multiple lines (always "False") |
Color |
Color |
The foreground color |
File |
String |
The path to the file containing the annotation |
Fill Color |
Color |
The fill color |
Fill Style |
Fillstyle |
The fill style |
Font |
String |
The name and size of the font |
Font Color |
Color |
The text color |
Framed |
Boolean |
Indicates whether the text is displayed with a frame |
Frame Border Color |
Color |
The frame border color |
Frame Border Style |
Linestyle |
The frame border style |
Frame Border Width |
Real |
The frame border width in points |
Frame Fill Color |
Color |
The frame background color |
Frame Fill Style |
Fillstyle |
The frame background fill style |
Frame Shield |
Array |
The highway shield definition (string font_name, array of (integer index, color)) |
Frame Type |
String |
Rectangle, Rounded Rectangle, Ellipse, Shield |
From Arrow |
Boolean |
Indicates whether an arrow is drawn at the start of the polyline |
Index |
Integer |
The character value from the font |
Line Color |
Color |
The line or border color |
Line Style |
Linestyle |
The line or border style |
Line Width |
Real |
The line or border width in points |
Location |
Array |
2 coords |
Map |
String |
The name of the map |
Name |
String |
The name of the legend |
Points |
Array |
An array of coordinates, X and Y on a layout or longitude and latitude on a map |
Rounded |
Boolean |
Indicates whether the rectangle has rounded corners |
Scope |
Scope |
The scope of the map |
Smooth |
Boolean |
Indicates whether the polyline is smoothed by fitting a spline |
Temporary |
Boolean |
Indicates whether the annotation is temporary; When set to "True" the annotation will not be saved as part of the map or workspace nor be replicated with DuplicateMap() (defaults to "False") |
Text |
String |
The text |
Title |
String |
The editor title |
To Arrow |
Boolean |
Indicates whether an arrow is drawn at the end of the polyline |
Flag |
Type |
Contents |
Editable |
Boolean |
"True" if the annotation is editable, otherwise "False" |
Protected |
Boolean |
"True" if the annotation is protected (cannot be selected), otherwise "False" |
Circle annotations are converted and stored as ellipses.
Label annotations are converted and stored as text.
View annotations are returned with the type Editor and their font color is returned with the Font Color specification.
Not all specifications listed for an annotation type are always returned.
If Protected is "True" the item cannot be interactively deleted.
If Editable is "False" the item cannot even be selected.
For a full list of GISDK functions for annotations, see Freehand Items (Annotations).
ann_array = GetAnnotation("Map|New York Map", 123)
Error Type |
Meaning |
NotFound |
The window or the specified annotation was not found |
Error |
The annotation has an unknown type |
Function |
Summary |
Adds an annotation to a map or layout window |
|
Returns the IDs of all annotations in a map or layout window |
|
Removes an annotation from a map or layout window |
|
Removes annotations from a map or layout window |
|
Gets the IDs of selected annotations in a map or layout window |
|
Moves an annotation to a new location |
|
Adds an annotation to the list of selected annotations |
|
Selects all annotations in a map or layout window |
|
Modifies an existing annotation in a map or layout window |
©2025 Caliper Corporation | www.caliper.com |