SetMapTitle()

Summary

Sets the title of a map.

Syntax

SetMapTitle(string map_name, string desc)

Argument Contents
map_name The name of the map or null for the current map
desc The title of the map

Notes

  • This function sets the map title, which is the string on the window title bar, to the right of the map filename.

  • When calling CreateMap() or OpenMap(), the map title will be the same as the map name unless the Title option is used.

  • Two maps can have the same map title, but they cannot have the same map name. Map names are set by CreateMap() and OpenMap() and are gotten with GetMap(), GetMaps(), and GetMapNames().

  • To change the filename portion of the window title you must change the map filename, which can be done with SetMapFile().

  • After calling SetMapFile(), the map filename will not be displayed on the window title bar until there is a call to SetMapTitle().

Example

//Set the title of the current map
SetMapTitle(, "Counties of the United States")

Error Codes

Error Type Meaning
NotFound The specified map does not exist

See Also

Function Summary
CreateMap() Create a new, empty map window
OpenMap() Open a map file and display it in a map window
GetMap() Gets the name of the current map
GetMaps() Get a list of maps and the name of the current map
GetMapNames() Gets a list of the names of maps in the system
GetMapTitle() Gets the title of a map
GetMapFile() Gets the name of the file in which a map was last saved
SetMapFile() Sets the filename for a map