On this page

Class TileManager

Methods mixed in to other classes for event capabilities.

Hierarchy (View Summary)

Index

Constructors

Properties

dispatcher: Dispatcher
id: string
style: Style
terrain: Terrain
tileSize: number
transform: ITransform
used: boolean
usedForTerrain: boolean
maxOverzooming: number
maxUnderzooming: number

Methods

  • Returns boolean

  • Remove all tiles from this pyramid

    Returns void

  • Parameters

    • event: string | Event
    • Optionalproperties: any

    Returns this

  • Get the entire state object for a feature

    Parameters

    • sourceLayer: string
    • featureId: string | number

    Returns FeatureState

  • Return all tile ids ordered with z-order, and cast to numbers

    Returns string[]

  • Get a currently loaded tile.

    • a cached tile is not a loaded tile

    Parameters

    Returns Tile | null

    the tile if it's in view and had data, null otherwise.

  • Parameters

    • OptionalsymbolLayer: boolean

    Returns string[]

  • Get a specific tile by id

    Parameters

    • id: string

    Returns Tile | undefined

  • Parameters

    • lng: number

    Returns void

  • Returns boolean

  • Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.

    Parameters

    • type: string

      The event type

    Returns boolean

    true if there is at least one registered listener for specified event type, false otherwise

  • Return true if no tile data is pending, tiles will not change unless an additional API call is received.

    Returns boolean

  • Removes a previously registered event listener.

    Parameters

    • type: string

      The event type to remove listeners for.

    • listener: Listener

      The listener function to remove.

    Returns this

  • Adds a listener to a specified event type.

    Parameters

    • type: string

      The event type to add a listen for.

    • listener: Listener

      The function to be called when the event is fired. The listener function is called with the data object passed to fire, extended with target and type properties.

    Returns Subscription

  • Adds a listener that will be called only once to a specified event type.

    The listener will be called first time the event fires after the listener is registered.

    Parameters

    • type: string

      The event type to listen for.

    • Optionallistener: Listener

      The function to be called when the event is fired the first time.

    Returns TileManager | Promise<any>

    this or a promise if a listener is not provided

  • Returns void

  • Reload any currently renderable tiles that are match one of the incoming tileId x/y/z

    Parameters

    Returns void

  • Returns void

  • Reload tiles based on the current state of the source.

    Parameters

    • OptionalsourceDataChanged: boolean

      If true, reload all tiles using a state of 'expired', otherwise reload only non-errored tiles using state of 'reloading'.

    • OptionalshouldReloadTileOptions: any

      Set of options associated with a MapSourceDataChangedEvent that can be passed back to the associated Source determine whether a tile should be reloaded.

    Returns void

  • Reloads all tiles that depend on the given keys.

    Parameters

    • namespaces: string[]
    • keys: string[]

    Returns void

  • Resets the value of a particular state key for a feature

    Parameters

    • OptionalsourceLayer: string
    • OptionalfeatureId: string | number
    • Optionalkey: string

    Returns void

  • Returns void

  • Returns any

  • Sets the set of keys that the tile depends on. This allows tiles to be reloaded when their dependencies change.

    Parameters

    • tileKey: string
    • namespace: string
    • dependencies: string[]

    Returns void

  • Bubble all events fired by this instance of Evented to this parent instance of Evented.

    Parameters

    • Optionalparent: Evented | null
    • Optionaldata: any

    Returns this

  • Set the value of a particular state for a feature

    Parameters

    • sourceLayer: string
    • featureId: string | number
    • state: any

    Returns void

  • Parameters

    • fadeDuration: number

    Returns void

  • Search through our current tiles and attempt to find the tiles that cover the given bounds.

    Parameters

    • pointQueryGeometry: Point[]

      coordinates of the corners of bounding rectangle

    • maxPitchScaleFactor: number
    • has3DLayer: boolean

    Returns TileResult[]

    result items have {tile, minX, maxX, minY, maxY}, where min/max bounding values are the given bounds transformed in into the coordinate space of this tile.

  • Removes tiles that are outside the viewport and adds new tiles that are inside the viewport.

    Parameters

    Returns void

  • Resizes the tile cache based on the current viewport's size or the maxTileCacheSize option passed during map creation

    Larger viewports use more tiles and need larger caches. Larger viewports are more likely to be found on devices with more memory and on pages where the map is more important.

    Parameters

    Returns void

Was this helpful?
SDK JS
Reference
TileManager