Interface Projection
get latitudeErrorCorrectionRadians(): number;
get name(): | PropertyValueSpecification<ProjectionDefinitionSpecification>
| undefined;
get shaderDefine(): string;
get shaderPreludeCode(): PreparedShader;
get shaderVariantName(): string;
get subdivisionGranularity(): SubdivisionGranularitySetting;
get transitionState(): number;
get useSubdivision(): boolean;
get vertexShaderPreludeCode(): string;
destroy(): void;
getMeshFromTileID(
context: Context,
tileID: CanonicalTileID,
hasBorder: boolean,
allowPoles: boolean,
usage: TileMeshUsage,
): Mesh;
hasTransition(): boolean;
recalculate(params: EvaluationParameters): void;
setErrorQueryLatitudeDegrees(value: number): any;
updateGPUdependent(renderContext: ProjectionGPUContext): void;
}
Accessors
latitudeErrorCorrectionRadians
- get latitudeErrorCorrectionRadians(): number
Returns number
name
Returns PropertyValueSpecification<ProjectionDefinitionSpecification> | undefined
shaderDefine
- get shaderDefine(): string
shaderPreludeCode
Returns PreparedShader
shaderVariantName
- get shaderVariantName(): string
Name of the shader projection variant that should be used for this projection. Note that this value may change dynamically, for example when globe projection internally transitions to mercator. Then globe projection might start reporting the mercator shader variant name to make MapLibre use faster mercator shaders.
Returns string
subdivisionGranularity
Returns SubdivisionGranularitySetting
Internal
An object describing how much subdivision should be applied to rendered geometry. The subdivision settings should be a constant for a given projection. Projections that do not require subdivision should return SubdivisionGranularitySetting.noSubdivision.
transitionState
- get transitionState(): number
useSubdivision
- get useSubdivision(): boolean
vertexShaderPreludeCode
- get vertexShaderPreludeCode(): string
Vertex shader code that is injected into every MapLibre vertex shader that uses this projection.
Returns string
Methods
destroy
getMeshFromTileID
- getMeshFromTileID(
context: Context,
tileID: CanonicalTileID,
hasBorder: boolean,
allowPoles: boolean,
usage: TileMeshUsage,
): MeshParameters
- context: Context
WebGL context.
- tileID: CanonicalTileID
The tile coordinates for which to return a mesh. Meshes for tiles that border the top/bottom mercator edge might include extra geometry for the north/south pole.
- hasBorder: boolean
When true, the mesh will also include a small border beyond the 0..EXTENT range.
- allowPoles: boolean
When true, the mesh will also include geometry to cover the north (south) pole, if the given tileID borders the mercator range's top (bottom) edge.
- usage: TileMeshUsage
Specify the usage of the tile mesh, as different usages might use different levels of subdivision.
Returns Mesh
- context: Context
hasTransition
recalculate
Parameters
- params: EvaluationParameters
Evaluation parameters.
Returns void
- params: EvaluationParameters
setErrorQueryLatitudeDegrees
updateGPUdependent
Parameters
- renderContext: ProjectionGPUContext
Returns void
Internal
Gets the error correction latitude in radians.