CloseMap()

Summary

Closes a map window.

Syntax

CloseMap(string map_name)

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

Notes

  • The system drops layers that are referenced only in the closed map.

  • CloseMap() closes the map window without executing the Close() macro.

  • If there is a Done macro, it is called after the map window is closed.

Example

// Here's a macro to close all open maps
maps = GetMapNames()
for i = 1 to maps.length do
CloseMap(maps[i])
end

Error Codes

Error Type Meaning
NotFound There is no map with the specified name, or map_name is null and the current window is not a map window

See Also

Function Summary
CreateMap() Create a new, empty map window
DuplicateMap() Creates a copy of a map
OpenMap() Open a map file and display it in a map window
SaveMap() Saves settings for a map window to a file on disk