On this page

Class TerrainTileManager

Methods mixed in to other classes for event capabilities.

Hierarchy (View Summary)

Index

Constructors

Properties

deltaZoom: number

raster-dem tiles will load for performance the actualZoom - deltaZoom zoom-level.

maxzoom: number

maximum zoomlevel to render the terrain.

minzoom: number

minimum zoomlevel to render the terrain.

tileManager: TileManager

tile manager for the raster-dem source.

tileSize: number

render-to-texture tileSize in scene.

Methods

  • gets whether any tiles were loaded after a specific time. This is used to update depth & coords framebuffers.

    Parameters

    • Optionaltime: number

      the time

    Returns boolean

    true if any tiles came into view at or after the specified time

  • Returns void

  • Parameters

    • key: string

    Returns Tile | undefined

  • Parameters

    • event: string | Event
    • Optionalproperties: any

    Returns this

  • Free render to texture cache

    Parameters

    Returns void

  • get a list of tiles, which are loaded and should be rendered in the current scene

    Returns Tile[]

    the renderable tiles

  • find the covering raster-dem tile

    Parameters

    • tileID: OverscaledTileID

      the tile to look for

    • OptionalsearchForDEM: boolean

      Optional parameter to search for (parent) source tiles with loaded dem.

    Returns Tile | undefined

    the tile

  • get terrain tile by the TileID key

    Parameters

    • id: string

      the tile id

    Returns Tile

    the tile

  • Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.

    Parameters

    • type: string

      The event type

    Returns boolean

    true if there is at least one registered listener for specified event type, false otherwise

  • Removes a previously registered event listener.

    Parameters

    • type: string

      The event type to remove listeners for.

    • listener: Listener

      The listener function to remove.

    Returns this

  • Adds a listener to a specified event type.

    Parameters

    • type: string

      The event type to add a listen for.

    • listener: Listener

      The function to be called when the event is fired. The listener function is called with the data object passed to fire, extended with target and type properties.

    Returns Subscription

  • Adds a listener that will be called only once to a specified event type.

    The listener will be called first time the event fires after the listener is registered.

    Parameters

    • type: string

      The event type to listen for.

    • Optionallistener: Listener

      The function to be called when the event is fired the first time.

    Returns Promise<any> | TerrainTileManager

    this or a promise if a listener is not provided

  • Bubble all events fired by this instance of Evented to this parent instance of Evented.

    Parameters

    • Optionalparent: Evented | null
    • Optionaldata: any

    Returns this

  • Load Terrain Tiles, create internal render-to-texture tiles, free GPU memory.

    Parameters

    Returns void

Was this helpful?
SDK JS
Reference
TerrainTileManager