Skip to content

geo.map.transform

3 functions / 2 types

Index

FunctionDescription
getExecute the get statement.
removeMake an ENU node a plain node again, standing where it stands now relative to its map.
setMake a node an ENU node of a map: the node hangs from the map and stands at a place on it with its local x axis east, y north and z up there, and its children are placed in those axes.
TypeDescription
EnuScaleHow an ENU node’s axes scale with the ground under it.
GeographicTransform

get

get(args: { node: SceneNode }, transactionId?: string): Promise<GeoMapTransformGeographicTransform | undefined>

Execute the get statement.

Returns Promise<GeoMapTransformGeographicTransform | undefined>.

node : SceneNode

transactionId optional : string

remove

remove(args: { node: SceneNode }, transactionId?: string): Promise<void>

Make an ENU node a plain node again, standing where it stands now relative to its map.

Fails with WrongNodeKind when node is not an ENU node.

Returns Promise<void>.

node : SceneNode

The ENU node.

transactionId optional : string

set

set(args: { map: SceneNode; node: SceneNode; position: GeoGeoPosition; scale?: GeoMapTransformEnuScale }, transactionId?: string): Promise<void>

Make a node an ENU node of a map: the node hangs from the map and stands at a place on it with its local x axis east, y north and z up there, and its children are placed in those axes.

The node follows the map through its motion and through the change between the globe and the flat map. With no height it stands on the drawn ground, relief exaggeration included, at sea level until the map holds elevation for the place, and it moves when finer ground arrives. A child ten units up stands ten meters over the place. The axes keep no shear: where the flat map draws east and north at an angle other than square, the children see that angle squared.

The node’s ordinary transform applies inside its ENU frame. Its translation is an ENU offset, followed by its rotation and scale. Removing geographic placement preserves the current pose as an ordinary transform under the map. Despawning the map despawns the node.

Fails with WrongNodeKind when node is not a node or map is not a map, and with InvalidArgument when node is a project node, a viewport camera, a map, or holds map among its children, or when position cannot be converted to the map’s height reference.

Returns Promise<void>.

map : SceneNode

The node geo.map.spawn_map answered for the map the node stands on.

node : SceneNode

The node, such as a shape.

position : GeoGeoPosition

scale optional : GeoMapTransformEnuScale

Absent, the axes follow the ground.

transactionId optional : string

EnuScale

Enum

How an ENU node’s axes scale with the ground under it.

FixedSize = 2

No scale: a child is drawn at its own size wherever the node stands.

FollowGround = 0

East and north each stretch as the drawn ground stretches along them, and up keeps its length. A child offset east or north lands on the ground that far away, on any map.

UniformGroundScale = 1

The same uniform scale on all axes, preserving shape under map distortion.

GeographicTransform

groundResolved : boolean

map : SceneNode

position : GeoGeoPosition