Class Tile

The class that holds the tiled data for a DataSource.

Hierarchy

  • Tile

Implements

  • CachedResource

Constructors

  • 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.

    • 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: boolean

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

    Returns Tile

Properties

copyrightInfo?: CopyrightInfo[]

Copyright information of this Tile's data.

dataSource: DataSource

The DataSource that created this Tile.

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.

dependencies: TileKey[] = []

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

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: 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: number = -1

The frame the Tile was first visible.

geoBox: GeoBox

The bounding box of this Tile in geocoordinates.

m_tileGeometryLoader?: TileGeometryLoader
numFramesVisible: number = 0

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

objects: TileObject[] = []

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

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.

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: 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

  • get decodedTile(): undefined | DecodedTile
  • Gets the decoded tile; it is removed after geometry handling.

    Returns undefined | DecodedTile

  • set decodedTile(decodedTile): void
  • Applies the decoded tile to the tile.

    Parameters

    • decodedTile: undefined | DecodedTile

      The decoded tile to set.

    Returns void

    Remarks

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

  • 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

  • get loadedGeometryKinds(): undefined | GeometryKindSet
  • Internal

    Gets a set of the GeometryKinds that were loaded (if any).

    Returns undefined | GeometryKindSet

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

    Returns boolean

    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]].

  • get 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.

    Returns number

  • set offset(offset): void
  • 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

  • get textElementGroups(): TextElementGroupPriorityList
  • Internal

    Gets the current GroupedPriorityList which contains a list of all TextElements to be selected and placed for rendering.

    Returns TextElementGroupPriorityList

  • get userTextElements(): TextElementGroup
  • Internal

    Returns TextElementGroup

    Deprecated

    User text elements are deprecated.

    Gets the list of developer-defined TextElement in this Tile.

    Remarks

    This list is always rendered first.

Methods

  • Adds a PathBlockingElement to this Tile.

    Parameters

    • blockingElement: PathBlockingElement

      Element which should block all other labels.

    Returns void

    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.

  • Internal

    Adds a callback that will be called whenever the tile is disposed.

    Parameters

    • callback: TileCallback

      The callback to be called when the tile is disposed.

    Returns void

    Remarks

    Multiple callbacks may be added.

  • Add ownership of a texture to this tile.

    Parameters

    • texture: Texture

      Texture to be owned by the Tile

    Returns void

    Remarks

    The texture will be disposed if the Tile is disposed.

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

    Parameters

    Returns void

    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.

  • Frees the rendering resources allocated by this Tile.

    Returns void

    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]]).

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

    Parameters

    • value: undefined | boolean

      A new value for the [[hasGeometry]] flag.

    Returns void

  • Removes a TextElement from this Tile.

    Parameters

    Returns boolean

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

    Remarks

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

  • Removes a developer-defined TextElement from this Tile.

    Parameters

    • textElement: TextElement

      A developer-defined TextElement to remove.

    Returns boolean

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

    Deprecated

    use removeTextElement.

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

    Returns void

  • 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.

  • 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.

  • 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.

  • Internal

    Update tile for current map view zoom level

    Parameters

    • zoomLevel: number

      Zoom level of the map view

    Returns void

  • Internal

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

    Parameters

    • Optional priority: number

      Priority assigned to asynchronous tasks doing the geometry update.

    • Optional enabledKinds: GeometryKindSet

      GeometryKinds that will be created.

    • Optional disabledKinds: GeometryKindSet

      GeometryKinds that will not be created.

    Returns boolean

    true if tile uses a geometry loader, false otherwise.

  • Called before MapView starts rendering this Tile.

    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.

    Remarks

Generated using TypeDoc