Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VisibleTileSet

Manages visible Tiles for MapView.

Responsible for election of rendered tiles:

  • quad-tree traversal
  • frustum culling
  • sorting tiles by relevance (visible area) to prioritize load
  • limiting number of visible tiles
  • caching tiles
  • searching cache to replace visible but yet empty tiles with already loaded siblings in nearby zoom levels

Hierarchy

  • VisibleTileSet

Index

Constructors

constructor

Properties

allVisibleTilesLoaded

allVisibleTilesLoaded: boolean = false

dataSourceTileList

dataSourceTileList: DataSourceTileList[] = []

options

Accessors

maxTilesPerFrame

  • get maxTilesPerFrame(): number
  • set maxTilesPerFrame(value: number): void

resourceComputationType

Methods

clearTileCache

  • clearTileCache(dataSource?: DataSource, filter?: undefined | ((tile: Tile) => boolean)): void

disposePendingTiles

  • disposePendingTiles(): void

disposeTile

  • disposeTile(tile: Tile): void

forEachCachedTile

  • forEachCachedTile(fun: (tile: Tile) => void, dataSource?: DataSource): void
  • Process callback function [[fun]] with each tile in the cache.

    Optional dataSource parameter limits processing to the tiles that belongs to DataSource passed in.

    Parameters

    • fun: (tile: Tile) => void

      The callback function to be called.

        • (tile: Tile): void
        • Parameters

          Returns void

    • Optional dataSource: DataSource

      The optional DataSource reference for tiles selection.

    Returns void

forEachVisibleTile

  • forEachVisibleTile(fun: (tile: Tile) => void): void

getCachedTile

  • getCachedTile(dataSource: DataSource, tileKey: TileKey, offset: number, frameNumber: number): Tile | undefined
  • Gets the tile corresponding to the given data source, key and offset from the cache.

    Parameters

    • dataSource: DataSource

      The data source the tile belongs to.

    • tileKey: TileKey

      The key identifying the tile.

    • offset: number

      Tile offset.

    • frameNumber: number

      Frame in which the tile was requested

    Returns Tile | undefined

    The tile if found in cache, undefined otherwise.

getDataSourceCacheSize

  • getDataSourceCacheSize(): number

getNumberOfVisibleTiles

  • getNumberOfVisibleTiles(): number

getRenderedTile

  • Gets the tile corresponding to the given data source, key and offset from the rendered tiles.

    Parameters

    • dataSource: DataSource

      The data source the tile belongs to.

    • tileKey: TileKey

      The key identifying the tile.

    • Default value offset: number = 0

      Tile offset.

    Returns Tile | undefined

    The tile if found among the rendered tiles, undefined otherwise.

getRenderedTileAtLocation

  • Gets the tile corresponding to the given data source and location from the rendered tiles.

    Parameters

    • dataSource: DataSource

      The data source the tile belongs to.

    • geoPoint: GeoCoordinates

      The geolocation included within the tile.

    • Default value offset: number = 0

    Returns Tile | undefined

    The tile if found among the rendered tiles, undefined otherwise.

getTile

  • getTile(dataSource: DataSource, tileKey: TileKey, offset: number, frameNumber: number): Tile | undefined
  • Gets the tile corresponding to the given data source, key and offset, creating it if necessary.

    Parameters

    • dataSource: DataSource

      The data source the tile belongs to.

    • tileKey: TileKey

      The key identifying the tile.

    • offset: number

      Tile offset.

    • frameNumber: number

      Frame in which the tile was requested

    Returns Tile | undefined

    The tile if it was found or created, undefined otherwise.

markTilesDirty

  • markTilesDirty(dataSource?: DataSource, filter?: undefined | ((tile: Tile) => boolean)): void
  • Visit each tile in visible, rendered, and cached sets.

    • Visible and temporarily rendered tiles will be marked for update and retained.
    • Cached but not rendered/visible will be evicted.

    Parameters

    • Optional dataSource: DataSource

      If passed, only the tiles from this DataSource instance are processed. If undefined, tiles from all DataSources are processed.

    • Optional filter: undefined | ((tile: Tile) => boolean)

      Optional tile filter

    Returns void

removeDataSource

setDataSourceCacheSize

  • Sets cache size.

    Parameters

    • size: number

      cache size

    • Default value computationType: ResourceComputationType = ResourceComputationType.EstimationInMb

      Optional value specifying the way a Tiles cache usage is computed, either based on size in MB (mega bytes) or in number of tiles. Defaults to ResourceComputationType.EstimationInMb.

    Returns void

setNumberOfVisibleTiles

  • setNumberOfVisibleTiles(size: number): void

updateClipPlanes

  • updateClipPlanes(maxElevation?: undefined | number, minElevation?: undefined | number): ViewRanges

updateRenderList

  • updateRenderList(storageLevel: number, zoomLevel: number, dataSources: DataSource[], frameNumber: number, elevationRangeSource?: ElevationRangeSource): { viewRanges: ViewRanges; viewRangesChanged: boolean }
  • Calculates a new set of visible tiles.

    Parameters

    • storageLevel: number

      The camera storage level, see MapView.storageLevel.

    • zoomLevel: number

      The camera zoom level.

    • dataSources: DataSource[]

      The data sources for which the visible tiles will be calculated.

    • frameNumber: number
    • Optional elevationRangeSource: ElevationRangeSource

      Source of elevation range data if any.

    Returns { viewRanges: ViewRanges; viewRangesChanged: boolean }

    view ranges and their status since last update (changed or not).

    • viewRanges: ViewRanges
    • viewRangesChanged: boolean

Generated using TypeDoc