Create PrismMap 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

Creates a Prism map. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Create PrismMap
	[ From Window window_ID | MapString mapper_creation_string ]
		{ layer_id | layer_name }
	With expr
	[ Camera [Pitch angle | Roll angle | Yaw angle | Elevation angle] |
		[ Position ( x, y, z ) | FocalPoint ( x, y, z ) ] |
		[ Orientation(vu_1, vu_2, vu_3, vpn_1, vpn_2, vpn_3, 
			clip_near, clip_far) ] 
	]
	[ Light Color lightcolor ] 
	[ Scale grid_scale ]
	[ Background backgroundcolor ]

window_id is a window identifier a for a Map window which contains a region layer. An error message is displayed if a layer with regions is not found.

mapper_creation_string specifies a command string that creates the mapper textured on the Prism map.

layer_id is the layer identifier of a layer in the map (one or larger).

layer_name is the name of a layer in the map.

expr is an expression that is evaluated for each row in the table.

Camera specifies the camera position and orientation.

angle is an angle measurement in degrees. The horizontal angle in the dialog box ranges from 0-360 degrees and rotates the maps around the center point of the grid. The vertical angle in the dialog box ranges from 0-90 and measures the rotation in elevation from the start point directly over the map.

Pitch adjusts the camera's current rotation about the x-axis centered at the camera's origin.

Roll adjusts the camera's current rotation about the z-axis centered at the camera's origin.

Yaw adjusts the camera's current rotation about the y-axis centered at the camera's origin.

Elevation adjusts the current camera's rotation about the x-axis centered at the camera's focal point.

Position indicates the camera and/or light position.

FocalPoint indicates the camera and/or light focal point.

Orientation specifies the camera's ViewUp (vu_1, vu_2, vu_3), ViewPlane Normal (vpn_1, vpn_2, vpn_3) and Clipping Range (clip_near and clip_far), used specifically for persistence of view).

grid_scale is the amount to scale the grid in the z direction. A value >1 will exaggerate the topology in the z direction, a value <1 will scale down the topological features in the z direction.

backgroundcolor is a color to be used to set the background and is specified using the RGB() function.

Description

The Create PrismMap statement creates a Prism Map window. The Prism Map is a way to associate multiple variables for a single object in one visual. For example, the color associated with a region may be the result of thematic shading while the height the object is extruded through may represent a different value. The Create PrismMap statement corresponds to MapInfo Pro's Prism Map command.

Between sessions, MapInfo Pro preserves Prism Maps settings by storing a Create PrismMap statement in the workspace file. Thus, to see an example of the Create PrismMap statement, you could create a map, choose the Add Theme command on the MAP tab, save the workspace (for example, PRISM.WOR), and examine the workspace in a MapBasic text edit window. You could then copy the Create PrismMap statement in your MapBasic program. Similarly, you can see examples of the Create PrismMap statement by opening the MapBasic window before you choose Add Theme.

Each Create PrismMap statement must specify an expr expression clause. MapInfo Pro evaluates this expression for each object in the layer; following the Create PrismMap statement, MapInfo Pro chooses each object's display style based on that record's expr value. The expression typically includes the names of one or more columns from the table being shaded.

The optional window_id clause identifies which map layer to use in the prism map; if no window_id is provided, MapBasic uses the topmost Map window. The Create PrismMap statement must specify which layer to use, even if the Map window has only one layer. The layer may be identified by number (layer_id), where the topmost map layer has a layer_id value of one, the next layer has a layer_id value of two, etc. Alternately, the Create PrismMap statement can identify the map layer by name (for example, "world").

Example

Open Table "STATES.TAB" Interactive
Map From STATES
Create PrismMap From Window FrontWindow() STATES With Pop_1980 Background 
RGB(192,192,192)

See Also:

Set PrismMap statement, PrismMapInfo() function