Options
All
  • Public
  • Public/Protected
  • All
Menu

The class that holds the tiled data for a DataSource.

Hierarchy

Implements

Index

Constructors

constructor

  • new Tile(dataSource: DataSource, tileKey: TileKey, offset?: number, localTangentSpace?: undefined | false | true): Tile
  • Creates a new Tile.

    Parameters

    • dataSource: DataSource

      The DataSource that created this Tile.

    • tileKey: TileKey

      The unique identifier for this Tile. Currently only up to level 24 is supported, because of the use of the upper bits for the offset.

    • Default value offset: number = 0

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

    • Optional localTangentSpace: undefined | false | true

      Whether the tile geometry is in local tangent space or not.

    Returns Tile

Properties

Optional copyrightInfo

copyrightInfo: CopyrightInfo[]

Copyright information of this Tile's data.

Readonly dataSource

dataSource: DataSource

The DataSource that created this Tile.

delayRendering

delayRendering: boolean = false

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.

Readonly dependencies

dependencies: TileKey[] = []

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

frameNumLastRequested

frameNumLastRequested: number = -1

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

frameNumLastVisible: number = -1

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

frameNumVisible: number = -1

The frame the Tile was first visible.

Readonly geoBox

geoBox: GeoBox

The bounding box of this Tile in geocoordinates.

Protected Optional Readonly m_tileGeometryLoader

m_tileGeometryLoader: TileGeometryLoader

numFramesVisible

numFramesVisible: number = 0

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

Readonly objects

objects: TileObject[] = []

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

skipRendering

skipRendering: boolean = false

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.

Readonly tileKey

tileKey: TileKey

The unique identifier for this Tile. Currently only up to level 24 is supported, because of the use of the upper bits for the offset.

visibilityCounter

visibilityCounter: number = -1

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.

Accessors

allGeometryLoaded

  • get allGeometryLoaded(): boolean

blockingElements

boundingBox

center

  • get center(): Vector3

decodedTile

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

    remarks

    If the geometry is empty, then the tile's forceHasGeometry flag is set. Map is updated.

    Returns DecodedTile | undefined

  • Applies the decoded tile to the tile.

    remarks

    If the geometry is empty, then the tile's forceHasGeometry flag is set. Map is updated.

    Parameters

    • decodedTile: DecodedTile | undefined

      The decoded tile to set.

    Returns void

disposed

  • get disposed(): boolean

elevationRange

hasGeometry

  • get hasGeometry(): 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.

    Returns boolean

isVisible

  • get isVisible(): boolean
  • set isVisible(visible: boolean): void

loadedGeometryKinds

localTangentSpace

  • get localTangentSpace(): boolean
  • Whether the data of this tile is in local tangent space or not.

    remarks

    If the data is in local tangent space (i.e. up vector is (0,0,1) for high zoomlevels) then MapView will rotate the objects before rendering using the rotation matrix of the oriented boundingBox.

    Returns boolean

mapView

memoryUsage

  • get memoryUsage(): number

offset

  • get offset(): number
  • set offset(offset: number): void
  • The optional offset, this is an integer which represents what multiple of 360 degrees to shift, only useful for flat projections, hence optional.

    Returns number

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

    Parameters

    • offset: number

      Which multiple of 360 degrees to apply to the Tile.

    Returns void

projection

textElementGroups

textElementsChanged

  • get textElementsChanged(): boolean
  • set textElementsChanged(changed: boolean): void
  • Gets the current modification state for the list of TextElements in the Tile.

    remarks

    If the value is true the TextElement is placed for rendering during the next frame.

    Returns boolean

  • Gets the current modification state for the list of TextElements in the Tile.

    remarks

    If the value is true the TextElement is placed for rendering during the next frame.

    Parameters

    • changed: boolean

    Returns void

tileLoader

uniqueKey

  • get uniqueKey(): number

userTextElements

visibleArea

  • get visibleArea(): number
  • set visibleArea(area: number): void

Methods

addBlockingElement

  • Adds a PathBlockingElement to this Tile.

    remarks

    This path has the highest priority and blocks all other labels. There maybe in future a use case to give it a priority, but as that isn't yet required, it is left to be implemented later if required.

    Parameters

    Returns void

addDisposeCallback

  • addDisposeCallback(callback: TileCallback): void
  • Adds a callback that will be called whenever the tile is disposed.

    remarks

    Multiple callbacks may be added.

    internal

    Parameters

    • callback: TileCallback

      The callback to be called when the tile is disposed.

    Returns void

addOwnedTexture

  • addOwnedTexture(texture: Texture): void
  • Add ownership of a texture to this tile.

    remarks

    The texture will be disposed if the Tile is disposed.

    Parameters

    • texture: Texture

      Texture to be owned by the Tile

    Returns void

addTextElement

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

    remarks

    The TextElement's priority controls if or when it becomes visible.

    To ensure that a TextElement is visible, use a high value for its priority, such as TextElement.HIGHEST_PRIORITY. Since the number of visible TextElements is limited by the screen space, not all TextElements are visible at all times.

    Parameters

    Returns void

addUserTextElement

clear

  • clear(): void
  • Frees the rendering resources allocated by this Tile.

    remarks

    The default implementation of this method frees the geometries and the materials for all the reachable objects. Textures are freed if they are owned by this Tile (i.e. if they where created by this Tileor if the ownership was explicitely set to this Tile by addOwnedTexture).

    Returns void

clearTextElements

  • clearTextElements(): void

computeWorldOffsetX

  • computeWorldOffsetX(): number

didRender

  • didRender(): void

dispose

  • dispose(): void

forceHasGeometry

  • forceHasGeometry(value: boolean | undefined): void

getResourceInfo

hasTextElements

  • hasTextElements(): boolean

invalidateResourceInfo

  • invalidateResourceInfo(): void

load

  • load(): Promise<void>

Protected loadingFinished

  • loadingFinished(): void

removeTextElement

  • Removes a TextElement from this Tile.

    remarks

    For the element to be removed successfully, the priority of the TextElement has to be equal to its priority when it was added.

    Parameters

    Returns boolean

    true if the TextElement has been removed successfully; false otherwise.

removeUserTextElement

  • removeUserTextElement(textElement: TextElement): boolean
  • Removes a developer-defined TextElement from this Tile.

    deprecated

    use removeTextElement.

    Parameters

    • textElement: TextElement

      A developer-defined TextElement to remove.

    Returns boolean

    true if the element has been removed successfully; false otherwise.

resetVisibilityCounter

  • resetVisibilityCounter(): void

shouldDisposeObjectGeometry

  • shouldDisposeObjectGeometry(object: TileObject): boolean
  • Called when the default implementation of dispose() needs to free the geometry of a Tile object.

    Parameters

    • object: TileObject

      The object that references the geometry.

    Returns boolean

    true if the geometry can be disposed.

shouldDisposeObjectMaterial

  • shouldDisposeObjectMaterial(object: TileObject): boolean
  • Called when the default implementation of dispose() needs to free a Tile object's material.

    Parameters

    • object: TileObject

      The object referencing the geometry.

    Returns boolean

    true if the material can be disposed.

shouldDisposeTexture

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

    Parameters

    • texture: Texture

      The texture about to be disposed.

    Returns boolean

    true if the texture can be disposed.

update

  • update(zoomLevel: number): void

updateGeometry

  • Start with or continue with loading geometry for tiles requiring this step. Called repeatedly until loading is finished.

    internal

    Parameters

    Returns boolean

    true if tile uses a geometry loader, false otherwise.

willRender

  • willRender(_zoomLevel: number): boolean
  • Called before MapView starts rendering this Tile.

    remarks

    Parameters

    • _zoomLevel: number

    Returns boolean

    Returns true if this Tile should be rendered. Influenced directly by the skipRendering property unless specifically overriden in deriving classes.

Generated using TypeDoc