ui/map/rendering/mercatorUtils¶
Interfaces¶
LngLatPoint¶
Defined in: ui/map/rendering/mercatorUtils.ts:11
Shared web-mercator math for the THREE.js custom layers. The 3D aircraft and 3D route layers each position their meshes in a local meters-from- scene-origin frame; both used to carry private copies of these conversions.
Properties¶
lng¶
Defined in: ui/map/rendering/mercatorUtils.ts:12
lat¶
Defined in: ui/map/rendering/mercatorUtils.ts:13
Functions¶
relativePositionMeters()¶
Defined in: ui/map/rendering/mercatorUtils.ts:21
East/north offset in meters from origin to target, using the mercator meter scale at the origin (consistent with a scene whose camera transform is scaled by meterInMercatorCoordinateUnits at the origin).
Parameters¶
origin¶
target¶
Returns¶
object
east¶
north¶
altitudeScaledForOrigin()¶
Defined in: ui/map/rendering/mercatorUtils.ts:43
Pre-scale an altitude so that, after the camera projection multiplies
scene Y by meterInMercatorCoordinateUnits at the SCENE ORIGIN's lat,
the resulting world Z equals altitude x per-point mercator scale. This
makes altitude rendering independent of which scene origin a layer
happens to use, so layers with different origins agree on visual height.
Parameters¶
altMeters¶
number
point¶
origin¶
Returns¶
number
mercatorCameraMatrix()¶
Defined in: ui/map/rendering/mercatorUtils.ts:61
Camera projection matrix for a scene positioned in meters relative to
origin: mainMatrix x translate(origin in mercator) x uniform meter scale.
Expects the scene group to map its local (east, up, north) frame into mercator axes with a plain rotateX(PI/2) and no mirror — keeping every scale positive avoids flipping texture content (e.g. fuselage text).
Parameters¶
mainMatrix¶
ArrayLike\<number>
origin¶
Returns¶
Matrix4