Type Alias SymbolProjectionContext
type SymbolProjectionContext = {
getElevation: (x: number, y: number) => number;
height: number;
lineVertexArray: SymbolLineVertexArray;
pitchedLabelPlaneMatrix: mat4;
pitchWithMap: boolean;
projectionCache: ProjectionCache;
tileAnchorPoint: Point;
transform: IReadonlyTransform;
translation: [number, number];
unwrappedTileID: UnwrappedTileID;
width: number;
}
getElevation: (x: number, y: number) => number;
height: number;
lineVertexArray: SymbolLineVertexArray;
pitchedLabelPlaneMatrix: mat4;
pitchWithMap: boolean;
projectionCache: ProjectionCache;
tileAnchorPoint: Point;
transform: IReadonlyTransform;
translation: [number, number];
unwrappedTileID: UnwrappedTileID;
width: number;
}
Properties
getElevation
getElevation: (x: number, y: number) => number
Type Declaration
- (x: number, y: number): number
Parameters
- x: number
the x coordinate
- y: number
the y coordinate
Returns number
- x: number
height
height: number
Viewport height.
lineVertexArray
The array of tile-unit vertices transferred from worker
pitchedLabelPlaneMatrix
Matrix for transforming from pixels (symbol shaping) to potentially rotated tile units (pitched map label plane).
pitchWithMap
pitchWithMap: boolean
True when line glyphs are projected onto the map, instead of onto the viewport.
projectionCache
Used to cache results, save cost if projecting the same vertex multiple times
tileAnchorPoint
Only for creating synthetic vertices if vertex would otherwise project behind plane of camera, but still convenient to pass it inside this type.
transform
translation
translation: [number, number]
Translation in tile units, computed using text-translate and text-translate-anchor paint style properties.
unwrappedTileID
width
width: number
Viewport width.
Was this helpful?
Function to get elevation at a point