Maps
- Last UpdatedDec 16, 2023
- 5 minute read
This topic is part of Specialized 2D Nodes.
Maps node
The Maps node can display a list of map images. It can display 3D point-related information, such as position of avatars, position of items and sensors, position of cameras). The map node manages the hints information overlay.
-
The Maps node is used inside Simulation module.
-
Being embedded in the Simulation module, there is generally no reason to instantiate other Maps nodes.
-
The Maps node must be configured to display the correct content.
Platform support
This node is supported on XR-Windows platform only.
|
XR-WIN |
XR-P-WIN |
XR-P-IOS |
XR-P-AND |
XR-P-WASM |
|---|---|---|---|---|
|
Full support |
No support |
No support |
No support |
No support |
|
|
|
|
|
|
Code example
This is a code example for Maps node.
<Maps name="maps" visible="false" visibleIngame="false" visibleHints="false" data="@def:simulation.maps@" position="460 140" size="1000 800" showAvatars="player0=@player0State.userName@,player1=@player1State.userName@,player2=@player2State.userName@,player3=@player3State.userName@"/>
Compass node
The Compass node is placed in overlay on the 3D rendering and updates in real time to always provide north direction.
Enable the compass
-
Set compassVisible to true.
Managing Maps and Hints Display
By default, a set of cameras appear over the map textures to use as jump points (showCameras) and a set of avatars to observe their positions and movements (showAvatars).
You can extend this information using the showNodes parameter, which accepts several type of nodes:
-
Items
-
Position sensors
-
Any other node with a name and a 3D position
For any item in the list, an icon and text display on the map.

Hints
Hints enable you to extend the information given by the maps. Hints display in the 3D visualization.
A hint displays an overlay text pinned to the corresponding node 3D position that shows text and the distance from the pinned position. If showDistanceInHints is set to false, then only the text displays.
You can activate hints using the visibleHints parameter. This displays information for all nodes in the showNodes list and all avatars in the showAvatars list, if the showAvatarsInHints parameter is set to true.

Managing the showNodes list
The showNodes list is a comma-separated list of node names. The list content can change and its modifications are reflected in real time in both maps and hint displays.
By default, the node text is set to the node group field, if present and not void, or to the node name in all the other cases.
You can redefine the values using the syntax nodeName = text.
Code example
A code example for showing nodes.
showNodes="valveXXX,positionSensorZZ,basicYY=a different text,valveXXX2"
Map fields
These are the fields for Maps node. Only the node-specific fields are indicated, not fields obtained by inheritance.
Field inheritance: NodeBase > Maps
|
Fields |
Type |
Use |
Default value |
Description |
|---|---|---|---|---|
|
automaticMapIngame |
sbool |
Optional |
false |
If set to false, the in-game maps always display map with ID = 0. Otherwise, it can change automatically to update map according to avatar position. |
|
currentCamera |
sint |
Optional |
0 |
Currently selected camera. |
|
currentCameraName |
sstring |
Optional |
Currently selected camera name to display. The text for the map is taken from nodeInfo parameter, if set, or otherwise from camera name field. |
|
|
currentMap |
sint |
Optional |
0 |
Currently displayed map. The map ID can be automatically calculated but also forced from outside (like using the map selection buttons). |
|
data |
mdstring |
Optional |
Not set |
Contains the map data. See Map configuration. Even if there is no default the parameter is configured in Simulation module to point @define:simulation.maps@ so the way to use is to configure this define. |
|
hintsColorBorder |
svec3 |
Optional |
1 1 0 |
The border color for hints. |
|
hintsColorText |
svec3 |
Optional |
1 1 1 |
The text color for hints. |
|
hintsFont |
sstring |
Optional |
Arial,Bold,12 |
The font used in hint display. |
|
itemFont |
sstring |
Optional |
Arial,Bold,12 |
The font used in nodes name display on the maps. |
|
northAngle |
sfloat |
Optional |
false |
Angle expressed in degrees that represents the north direction. Zero (0) means toward Z axis. |
|
numberOfCameras |
sint |
Read only |
Internally calculated |
Shows the number of cameras displayed in the currently visualized map. |
|
numberOfMaps |
sint |
Read only |
Internally calculated |
Expose the number of maps read from data field content. |
|
position |
svec2 |
Optional |
0 0 |
Screen position in grid points for placing the map. |
|
positionCompass |
svec2 |
Optional |
1644 20 |
Screen position in grid points for compass. |
|
positionIngame |
svec2 |
Optional |
1684 60 |
Screen position in grid points for in-game radar map. |
|
size |
svec2 |
Optional |
1000 800 |
Map area size in grid points. |
|
sizeCompass |
svec2 |
Optional |
256 256 |
Compass size. |
|
sizeIngame |
svec2 |
Optional |
176 176 |
In game map size. |
|
showAvatars |
mstring |
Optional |
player0,player1,player2,player3 |
List of avatars to display on the maps. |
|
showAvatarsInHints |
sbool |
Optional |
true |
Enables inclusion of avatars in hints display. |
|
showCameras |
mstring |
Optional |
List of cameras to display in the maps and to use as jump points. |
|
|
showCompassInMaps |
sbool |
Optional |
false |
Set to true to print the compass over the maps display. This is not for in game map. |
|
showDistanceInHints |
sbool |
Optional |
true |
Specifies whether to include the distance in display hints. |
|
showNodes |
mstring |
Optional |
List of nodes to display inside maps and hints. |
|
|
useLocalAvatarForHints |
sbool |
Optional |
false |
When set to true, the hints distance is calculated based on the localAvatar position. Otherwise, hints distance is based on currentCamera position. |
|
visible |
sbool |
Optional |
false |
Used to show/hide maps. |
|
visibleCompass |
sbool |
Optional |
false |
Shows/hide compass. |
|
visibleHints |
sbool |
Optional |
false |
Switches on and off the hints display. |
|
visibleIngame |
sbool |
Optional |
false |
Shows/hides in-game radar map. This in-game map is rarely used. |