Skip to content

ui/map/rendering/globeMatrix

Variables

EARTH_RADIUS_METERS

const EARTH_RADIUS_METERS: 6371008.8 = 6371008.8;

Defined in: ui/map/rendering/globeMatrix.ts:18

Mean earth radius in meters, matching MapLibre's internal value.

Functions

getGlobeModelMatrix()

function getGlobeModelMatrix(lngLat, altitudeMeters): Matrix4;

Defined in: ui/map/rendering/globeMatrix.ts:27

Matrix placing a meters-scale, Y-up model on the unit-radius globe at the given position. Multiply with defaultProjectionData.mainMatrix from the custom layer render args to project to clip space. Note the resulting frame is mirror-flipped (opposite handedness) relative to a corrected mercator scene.

Parameters

lngLat

[number, number]

altitudeMeters

number

Returns

Matrix4