Skip to main content

flywave-mapview.tile

Home > @flywave/flywave-mapview > Tile

Tile class

The class that holds the tiled data for a DataSource.

Signature:

export declare class Tile implements CachedResource 

Implements: CachedResource

Constructors

Constructor

Modifiers

Description

(constructor)(dataSource, tileKey, offset, localTangentSpace)

Creates a new Tile.

Properties

Property

Modifiers

Type

Description

allGeometryLoaded

readonly

boolean

True if all geometry of the Tile has been loaded.

blockingElements

readonly

PathBlockingElement[]

Get the current blocking elements.

boundingBox

readonly

OrientedBox3

Gets the tile's bounding box.

center

readonly

THREE.Vector3

The center of this Tile in world coordinates.

copyrightInfo?

CopyrightInfo[]

(Optional) Copyright information of this Tile's data.

dataSource

readonly

DataSource

decodedTile

DecodedTile | undefined

Gets the decoded tile; it is removed after geometry handling.

delayRendering

boolean

If the tile should not yet be rendered, this is used typically when the tile in question does not fit into the gpu upload limit of the current frame. Setting this value directly affects the [[willRender]] method, unless overriden by deriving classes.

dependencies

readonly

TileKey[]

The optional list of HERE TileKeys of tiles with geometries that cross the boundaries of this Tile.

disposed

readonly

boolean

Returns true if this Tile has been disposed.

frameNumLastRequested

number

Keeping some stats for the individual Tiles to analyze caching behavior.

The frame the Tile was last requested. This is required to know when the given Tile can be removed from the cache.

frameNumLastVisible

number

The last frame this Tile has been rendered (or was in the visible set). Used to determine visibility of Tile at the end of a frame, if the number is the current frame number, it is visible.

frameNumVisible

number

The frame the Tile was first visible.

geoBox

readonly

GeoBox

The bounding box of this Tile in geocoordinates.

hasGeometry

readonly

boolean

MapView checks if this Tile is ready to be rendered while culling.

By default, MapView checks if the [[objects]] list is not empty. However, you can override this check by manually setting this property.

isVisible

boolean

The visibility status of the Tile. It is actually visible or planned to become visible.

levelOffset

number

Used to tell if the Tile is used temporarily as a fallback tile.

levelOffset is in in the range [-quadTreeSearchDistanceUp, quadTreeSearchDistanceDown], where these values come from the VisibleTileSetOptions

localTangentSpace

readonly

boolean

Whether the data of this tile is in local tangent space or not.

m_tileGeometryLoader?

protected

readonly

TileGeometryLoader

(Optional)

mapView

readonly

MapView

The MapView this Tile belongs to.

memoryUsage

readonly

number

numFramesVisible

number

After removing from cache, this is the number of frames the Tile was visible.

objects

readonly

TileObject[]

A list of the THREE.js objects stored in this Tile.

offset

number

The optional offset, this is an integer which represents what multiple of 360 degrees to shift, only useful for flat projections, hence optional.

preparedTextPaths

protected

TextPathGeometry[] | undefined

Prepared text geometries optimized for display.

projection

readonly

Projection

The currently used by the MapView.

skipRendering

boolean

If the tile should not be rendered, this is used typically when the tile in question is completely covered by another tile and therefore can be skipped without any visual impact. Setting this value directly affects the [[willRender]] method, unless overriden by deriving classes.

textElementsChanged

boolean

Gets the current modification state for the list of s in the Tile.

textStyleCache

readonly

TileTextStyleCache

Text style cache for this tile.

tileGeometryLoader

readonly

TileGeometryLoader | undefined

tileKey

readonly

TileKey

tileLoader

ITileLoader | undefined

Gets the ITileLoader that manages this tile.

uniqueKey

readonly

number

Gets the key to uniquely represent this tile (based on the and ).

visibilityCounter

number

Version stamp of the visibility set in the [[TileManager]]. If the counter is different, the visibility of the Tile's objects has to be calculated. Optimization to reduce overhead of computing visibility.

visibleArea

number

Estimated visible area of tile used for sorting the priorities during loading.

Methods

Method

Modifiers

Description

addBlockingElement(blockingElement)

Adds a PathBlockingElement to this Tile.

addOwnedTexture(texture)

Add ownership of a texture to this tile.

addTextElement(textElement)

Adds a to this Tile, which is added to the visible set of s based on the capacity and visibility.

addUserTextElement(textElement)

Adds a developer-defined to this Tile.

clear()

Frees the rendering resources allocated by this Tile.

clearTextElements()

Removes all from the tile.

computeWorldOffsetX()

Computes the offset in the x world coordinates corresponding to this tile, based on its .

didRender()

Called after MapView has rendered this Tile.

dispose()

Disposes this Tile, freeing all geometries and materials for the reachable objects.

forceHasGeometry(value)

Overrides the default value for [[hasGeometry]] if value is not undefined.

getResourceInfo()

Compute TileResourceInfo of this Tile.

hasTextElements()

Returns true if the Tile has any text elements to render.

invalidateResourceInfo()

Force invalidation of the cached TileResourceInfo.

load()

Loads this Tile geometry.

loadingFinished()

protected

Called when is finished.

raycast(rayCaster, intersects, recursive)

Performs raycasting on the tile's objects.

removeTextElement(textElement)

Removes a from this Tile.

removeUserTextElement(textElement)

Removes a developer-defined from this Tile.

resetVisibilityCounter()

Reset the visibility counter. This will force the visibility check to be rerun on all objects in this Tile.

shouldDisposeObjectGeometry(object)

Called when the default implementation of dispose() needs to free the geometry of a Tile object.

shouldDisposeObjectMaterial(object)

Called when the default implementation of dispose() needs to free a Tile object's material.

shouldDisposeTexture(texture)

Called when the default implementation of dispose() needs to free a Texture that is part of a Tile object's material.

updateBoundingBox(newBoundingBox)

protected

Updates the tile's world bounding box.

willRender(_zoomLevel)

Called before MapView starts rendering this Tile.