Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

CalculateTileZoomFunction()

CalculateTileZoomFunction = (requestedCenterZoom: number, distanceToTile2D: number, distanceToTileZ: number, distanceToCenter3D: number, cameraVerticalFOV: number) => number

Defined in: src/geo/projection/covering_tiles.ts:72

Function to define how tiles are loaded at high pitch angles

Parameters

ParameterTypeDescription
requestedCenterZoomnumberthe requested zoom level, valid at the center point.
distanceToTile2Dnumber2D distance from the camera to the candidate tile, in mercator units.
distanceToTileZnumbervertical distance from the camera to the candidate tile, in mercator units.
distanceToCenter3Dnumberdistance from camera to center point, in mercator units
cameraVerticalFOVnumbercamera vertical field of view, in degrees

Returns

number

the desired zoom level for this tile. May not be an integer.