---
title: "SymbolProjectionContext | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias SymbolProjectionContext

type SymbolProjectionContext \= {  
    [getElevation](#getelevation): (x: number, y: number) \=> number;  
    [height](#height): number;  
    [lineVertexArray](#linevertexarray): [SymbolLineVertexArray](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.SymbolLineVertexArray/);  
    [pitchedLabelPlaneMatrix](#pitchedlabelplanematrix): [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/);  
    [pitchWithMap](#pitchwithmap): boolean;  
    [projectionCache](#projectioncache): [ProjectionCache](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ProjectionCache/);  
    [tileAnchorPoint](#tileanchorpoint): [Point](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Point/);  
    [transform](#transform): [IReadonlyTransform](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.IReadonlyTransform/);  
    [translation](#translation): \[number, number\];  
    [unwrappedTileID](#unwrappedtileid): [UnwrappedTileID](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.UnwrappedTileID/);  
    [width](#width): number;  
}

##### Index

### Properties[](#properties)

[getElevation](#getelevation) [height](#height) [lineVertexArray](#linevertexarray) [pitchedLabelPlaneMatrix](#pitchedlabelplanematrix) [pitchWithMap](#pitchwithmap) [projectionCache](#projectioncache) [tileAnchorPoint](#tileanchorpoint) [transform](#transform) [translation](#translation) [unwrappedTileID](#unwrappedtileid) [width](#width)

## Properties[](#properties-1)

### getElevation[](#getelevation)

getElevation: (x: number, y: number) \=> number

Function to get elevation at a point

#### Type Declaration

-   -   (x: number, y: number): number
    -   #### Parameters
        
        -   x: number
            
            the x coordinate
            
        -   y: number
            
            the y coordinate
            
        
        #### Returns number
        

### height[](#height)

height: number

Viewport height.

### lineVertexArray[](#linevertexarray)

lineVertexArray: [SymbolLineVertexArray](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.SymbolLineVertexArray/)

The array of tile-unit vertices transferred from worker

### pitchedLabelPlaneMatrix[](#pitchedlabelplanematrix)

pitchedLabelPlaneMatrix: [mat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.mat4/)

Matrix for transforming from pixels (symbol shaping) to potentially rotated tile units (pitched map label plane).

### pitchWithMap[](#pitchwithmap)

pitchWithMap: boolean

True when line glyphs are projected onto the map, instead of onto the viewport.

### projectionCache[](#projectioncache)

projectionCache: [ProjectionCache](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ProjectionCache/)

Used to cache results, save cost if projecting the same vertex multiple times

### tileAnchorPoint[](#tileanchorpoint)

tileAnchorPoint: [Point](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Point/)

Only for creating synthetic vertices if vertex would otherwise project behind plane of camera, but still convenient to pass it inside this type.

### transform[](#transform)

transform: [IReadonlyTransform](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.IReadonlyTransform/)

### translation[](#translation)

translation: \[number, number\]

Translation in tile units, computed using text-translate and text-translate-anchor paint style properties.

### unwrappedTileID[](#unwrappedtileid)

unwrappedTileID: [UnwrappedTileID](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.UnwrappedTileID/)

### width[](#width)

width: number

Viewport width.
