跳到主要内容

flywave-mapview.visibletileset

Home > @flywave/flywave-mapview > VisibleTileSet

VisibleTileSet class

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

Signature:

export declare class VisibleTileSet 

Constructors

Constructor

Modifiers

Description

(constructor)(m_frustumIntersection, m_tileGeometryManager, options, m_taskQueue)

Constructs a new instance of the VisibleTileSet class

Properties

Property

Modifiers

Type

Description

allVisibleTilesLoaded

boolean

dataSourceTileList

DataSourceTileList[]

maxGeometryHeight

number

maxTilesPerFrame

number

(BETA) Gets the maximum number of tiles that can be added to the scene per frame

minGeometryHeight

number

options

VisibleTileSetOptions

resourceComputationType

ResourceComputationType

The way the cache usage is computed, either based on size in MB (mega bytes) or in number of tiles.

Methods

Method

Modifiers

Description

clearTileCache(dataSource, filter)

Clear the tile cache.

Remove the Tile objects created by cacheable DataSource. If a DataSource name is provided, this method restricts the eviction the DataSource with the given name.

disposePendingTiles()

Dispose tiles that are marked for removal by algorithm.

disposeTile(tile)

Dispose a Tile from cache, 'dispose()' is also called on the tile to free its resources.

forEachCachedTile(fun, dataSource)

Process callback function [[fun]] with each tile in the cache.

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

forEachVisibleTile(fun)

Process callback function [[fun]] with each visible tile in set.

getCachedTile(dataSource, tileKey, offset, frameNumber)

Gets the tile corresponding to the given data source, key and offset from the cache.

getDataSourceCacheSize()

Returns cache size.

getNumberOfVisibleTiles()

Retrieves maximum number of visible tiles.

getRenderedTile(dataSource, tileKey, offset)

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

getRenderedTileAtLocation(dataSource, geoPoint, offset)

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

getTile(dataSource, tileKey, offset, frameNumber)

Gets the tile corresponding to the given data source, key and offset, creating it if necessary.

markTilesDirty(dataSource, filter)

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.

removeDataSource(dataSource)

Removes all internal bookkeeping entries and cache related to specified datasource.

Called by MapView when DataSource has been removed from MapView.

setDataSourceCacheSize(size, computationType)

Sets cache size.

setNumberOfVisibleTiles(size)

Sets maximum number of visible tiles.

updateClipPlanes(maxElevation, minElevation)

Evaluate frustum near/far clip planes and visibility ranges.

updateRenderList(storageLevel, zoomLevel, dataSources, frameNumber, elevationRangeSource)

Calculates a new set of visible tiles.