Set Map3D 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

Change the settings of an existing 3DMap window. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Set Map3D
	[ Window window_id ]
	[ Camera [ Zoom factor | 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 [ Position ( x, y, z | Color lightcolor ] ]
	[ Resolution ( res_x, res_y ) ]
	[ Scale grid_scale ]
	[ Background backgroundcolor ]
	[ Refresh ]

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

factor specifies the amount to set the zoom.

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.

res_x, res_y is the number of samples to take in the x- and y-directions. These values can increase to a maximum of the grid resolution. The resolution values can increase to a maximum of the grid x,y dimension. If the grid is 200x200 then the resolution values will be clamped to a maximum of 200x200. You cannot increase the grid resolution, only specify a subsample value.

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 Set Map3D statement changes the settings of an already created 3D Map. If the original tables from which the 3D Map was created were modified either by adding labels or by modifying geometry, Refresh will capture the changes in the mapper and recreate the 3D map based on those changes.

Camera specifies the camera position and orientation.

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/light position.

FocalPoint indicates the camera/light focal point.

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

Resolution is the number of samples to take in the x- and y-directions. These values can increase to a maximum of the grid resolution. The resolution values can increase to a maximum of the grid x,y dimension. If the grid is 200x200 then the resolution values will be clamped to a maximum of 200x200. You cannot increase the grid resolution, only specify a subsample value.

Units specifies the units the grid values are in. Do not specify this for unit-less grids (for example, grids generated using temperature or density). This option needs to be specified at creation time. If there are units associated with your grid values, they have to specified when you create the 3DMap. You cannot change them later with Set Map3D or the Properties dialog box.

Refresh regenerates the texture from the original tables.

Example

The last line in the following changes the original 3DMap window's resolution in the X and Y, the scale to de-emphasize the grid in the Z direction (< 1) and change the background color to yellow.

Dim win3D as Integer
Create Map3D Resolution(75,75) Resolution(100,100) Scale 2 Background 
RGB(255,0,0)
win3D = FrontWindow()
Set Map3D Window win3D Resolution(150,100) Scale 0.75 Background 
RGB(255,255,0)

See Also:

Create Map3D statement, Map3DInfo() function