Object Reference : Object View and Procedure Reference : Geomap
  
 
addtitle
Place an individual title in geomaps.
A geomap is capable of storing one title. When adding a title to a geomap that already has a title, the existing title will be deleted.
Syntax
geomap_name.addtitle(options) "text"
Follow the addtitle keyword with the text to be placed in the geomap, enclosed in double quotes.
To include carriage returns in your text, use the control “\r” or “\n” to represent the return. Since the backslash “\” is a special character in the addtitle command, use a double slash “\\” to include the literal backslash character.
Options
The following options may be provided to change the characteristics of the specified text object. Any unspecified options will use the default text settings of the geomap.
 
font([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of text font. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
textcolor(arg)
Sets the color of the text. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
fillcolor(arg)
Sets the background fill color of the text box. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
framecolor(arg)
Sets the color of the text box frame. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
The following options control the position of the text:
 
ctm
Center top map.
ltm
Left top map.
rtm
Right top map.
cbm
Center bottom map.
lbm
Left bottom map.
rbm
Right bottom map.
lmm
Left middle map.
rmm
Right middle map.
lmp
Left-middle of point.
rmp
Right-middle of point.
lap
Left above point.
rap
Right above point.
lbp
Left below point.
rbp
Right below point.
cap
Center above point.
cbp
Center below point.
just(arg)
Set the justification of the text, where arg may be “c” (center), “l” (left - default), “r” (right).
x, lb
Enclose text in a large box.
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
To place text within a geomap, you can use explicit coordinates to specify the position of the upper left corner of the text.
Coordinates are set by a pair of numbers h, v in map units. Use the geomap data members @minx, @miny, @maxx, and @maxy to obtain the position limits.
Coordinates may be used with other options, but they must be in the first two positions of the options list. Coordinates are overridden by other options that specify location.
Color definitions
color_arg specifies the color to be employed in the arguments above. The color may be specified using predefined color names, by specifying the individual red-green-blue (RGB) components using the special “@RGB” function, or by specifying the individual red-green-blue (RGB) components in hexadecimal using the special “@HEX” function.
The predefined colors are given by the keywords (with their RGB and HEX equivalents):
 
blue
@rgb(0, 0, 255)
@hex(0000ff)
red
@rgb(255, 0, 0)
@hex(ff0000)
ltred
@rgb(255, 168, 168)
@hex(ffa8a8)
green
@rgb(0, 128, 0)
@hex(008000)
black
@rgb(0, 0, 0)
@hex(000000)
white
@rgb(255, 255, 255)
@hex(ffffff)
purple
@rgb(128, 0, 128)
@hex(800080)
orange
@rgb(255, 128, 0)
@hex(ff8000)
yellow
@rgb(255, 255, 0)
@hex(ffff00)
gray
@rgb(128, 128, 128)
@hex(808080)
ltgray
@rgb(192, 192, 192)
@hex(c0c0c0)
Examples
geomap1.addtitle(ctm) "Fig 1: United States Population"
places the text "Fig 1: United States Population" centered above of GEOMAP1.
geomap1.addtitle(400, 350, rap, X) "Population surge"
places the text “Population surge” in a box within GEOMAP1, where the text is center above the point located at (400, 350).
geomap1.addtitle(c, ltm, textcolor(green), fillcolor(gray), framecolor(black)) "Great Lake\nWater Levels"
adds the text “Great Lakes” with “Water Levels” just below on a second line at the top left corner of the map. The text is colored green and is enclosed in a gray box with a large black frame.
Cross-references
See “Geomaps” for a discussion of geomaps. See “Value-Based Text and Fill Coloring” for a discussion of color settings.
See also Geomap::setfillcolor.