Set Map statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Modifies an existing Map window. You can issue this statement from the MapBasic window in MapInfo Pro. The Set Map statement has an extensive set of clauses, so syntax descriptions are organized by topic.

Syntax

Set Map 
	[ Window window_id ]
	[ MAP_BEHAVIOR_CLAUSE ]
	[ VIEW_CLAUSE ]
	[ LAYER_PROPERTY_CLAUSE ]
	[ LABEL_CLAUSE ]
	[ STYLE_OVERRIDE_CLAUSE ]
	[ LABEL_OVERRIDE_CLAUSE ]
	[ GROUPLAYER_PROPERTY_CLAUSE ]
	[ ORDER_LAYERS_CLAUSE ]
	[ COORDSYS_CLAUSE ]
	[ IMAGE_CLAUSE ]
	[ LAYER_ACTIVATE_CLAUSE ]
	[ LAYER_OVERRIDE_CLAUSE ]

window_id is the integer window identifier of a Map window.

MAP_BEHAVIOR_CLAUSE, see Changing the Behavior of the Entire Map

VIEW_CLAUSE, see Changing the Current View of the Map

LAYER_PROPERTY_CLAUSE, see Managing Individual Layer Properties and Appearance

LABEL_CLAUSE, see Managing Individual Label Properties

STYLE_OVERRIDE_CLAUSE, see Adding Style Overrides to a Layer

LABEL_OVERRIDE_CLAUSE, see Adding Overrides for Layer Labels

GROUPLAYER_PROPERTY_CLAUSE, see Managing Group Layers

ORDER_LAYERS_CLAUSE, see Ordering Layers

COORDSYS_CLAUSE, see Managing the Coordinate System of the Map

IMAGE_CLAUSE, see Managing Image Properties

LAYER_ACTIVATE_CLAUSE, see Managing Hotlinks

LAYER_OVERRIDE_CLAUSE, see Adding Style Overrides to a Layer

Description

The Set Map statement controls the settings of a Map window. If no window_id is specified, the statement affects the topmost Map window. This statement allows a MapBasic program to control options a user would set through MapInfo Pro's Layers, Change View, and Map Options commands. For example, the Set Map statement lets you configure which map layer is editable, and lets you set the map's zoom distance or scale.

Note: Set Map controls the contents of a Map window, not the size or position of the window's frame. To change the size or position of a Map window, use the Set Window statement.

Between sessions, MapInfo Pro preserves Map settings by storing a Set Map statement in a workspace file. To see an example of the Set Map statement, create a map, save the workspace (for example, MAPPER.WOR), and examine the workspace in a text editor, such as Notepad.

The order of the clauses in a Set Map statement is very important. Entering the clauses in an incorrect order can generate a syntax error.

See Also:

Add Map statement, Map statement, MapperInfo() function, Remove Map statement, Set Window statement, LayerInfo() function, LayerListInfo() function, LayerStyleInfo() function, StyleOverrideInfo() function, LabelOverrideInfo() function