On this page

Class OverscaledTileID

An overscaled tile identifier

Index

Constructors

  • Parameters

    • overscaledZ: number
    • wrap: number
    • z: number
    • x: number
    • y: number

    Returns OverscaledTileID

Properties

canonical: CanonicalTileID
key: string
overscaledZ: number
terrainRttPosMatrix32f: mat4 | null

This matrix is used during terrain's render-to-texture stage only. If the render-to-texture stage is active, this matrix will be present and should be used, otherwise this matrix will be null. The matrix should be float32 in order to avoid slow WebGL calls in Chrome.

wrap: number

Methods

  • Parameters

    • targetZ: number
    • withWrap: boolean

    Returns string

  • Returns boolean

  • Maps tile-local coordinates that may fall outside the [0, extent) range to the correct neighbor tile and the corresponding in-tile position.

    Coordinates can exceed tile bounds when geometry (e.g. symbol labels along lines) extends across tile edges. This method resolves such coordinates to the appropriate adjacent tile, wrapping horizontally across world boundaries and returning null when the target falls beyond the polar tile-grid limits.

    When the coordinates are already in bounds, the original tile ID is returned.

    Parameters

    • x: number

      x coordinate relative to this tile, may be outside [0, extent)

    • y: number

      y coordinate relative to this tile, may be outside [0, extent)

    • Optionalextent: number

      tile coordinate extent, default EXTENT

    Returns { tileID: OverscaledTileID; x: number; y: number } | null

    the resolved tile ID and in-tile coordinates, or null if the target is beyond the tile grid (e.g. past the poles)

  • Returns number

  • Returns a new OverscaledTileID representing the tile at the target zoom level. When targetZ is greater than the current canonical z, the canonical coordinates are unchanged. When targetZ is less than the current canonical z, the canonical coordinates are updated.

    Parameters

    • targetZ: number

      the zoom level to scale to. Must be less than or equal to this.overscaledZ

    Returns OverscaledTileID

    a new OverscaledTileID representing the tile at the target zoom level

    if targetZ is greater than this.overscaledZ

  • Returns string

Was this helpful?
SDK JS
Reference
OverscaledTileID