Classdesc

Layer source for Bing Maps tile data.

Api

Hierarchy (view full)

Constructors

Properties

crossOrigin: null | string
disposed: boolean

The object has already been disposed.

loading: boolean

This source is currently loading data. Sources that defer loading to the map's tile queue never set this to true.

on: TileSourceOnSignature<EventsKey>
once: TileSourceOnSignature<EventsKey>
projection: null | Projection
tileCache: TileCache
tileCacheForProjection: {
    [x: string]: TileCache;
}

Type declaration

tileClass: typeof ImageTile
tileGrid: null | TileGrid
tileGridForProjection: {
    [x: string]: default;
}

Type declaration

  • [x: string]: default
tileLoadFunction: LoadFunction
tileOptions: Options
tmpSize: Size
un: TileSourceOnSignature<void>
urls: null | string[]
viewRejector: ((arg0) => void)

Type declaration

    • (arg0): void
    • Parameters

      • arg0: Error

      Returns void

viewResolver: ((arg0) => void)

Type declaration

    • (arg0): void
    • Parameters

      • arg0: ViewOptions

      Returns void

zDirection: number | NearestDirectionFunction

zDirection hint, read by the renderer. Indicates which resolution should be used by a renderer if the views resolution does not match any resolution of the tile source. If 0, the nearest resolution will be used. If 1, the nearest lower resolution will be used. If -1, the nearest higher resolution will be used.

Methods

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Protected

    Apply any properties from another object without triggering events.

    Parameters

    • source: Object

      The source object.

    Returns void

  • Returns boolean

    Can expire cache.

  • Increases the revision counter and dispatches a 'change' event.

    Returns void

    Api

  • Remove all cached tiles from the source. The next render cycle will fetch new tiles.

    Returns void

    Api

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    • event: string | BaseEvent

      Event object.

    Returns undefined | boolean

    false if anyone called preventDefault on the event object or if any of the listeners returned false.

    Api

  • Clean up.

    Returns void

  • Protected

    Extension point for disposable objects.

    Returns void

  • Parameters

    • projection: Projection

      Projection.

    • usedTiles: {
          [x: string]: boolean;
      }

      Used tiles.

      • [x: string]: boolean

    Returns void

  • Parameters

    • projection: Projection

      Projection.

    • z: number

      Zoom level.

    • tileRange: TileRange

      Tile range.

    • callback: ((arg0) => boolean | void)

      Called with each loaded tile. If the callback returns false, the tile will not be considered loaded.

        • (arg0): boolean | void
        • Parameters

          Returns boolean | void

    Returns boolean

    The tile range is fully covered with loaded tiles.

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

    Api

  • Get the api key used for this source.

    Returns string

    The api key.

    Api

  • Get the attribution function for the source.

    Returns null | Attribution

    Attribution function.

    Api

  • Returns boolean

    Attributions are collapsible.

    Api

  • Returns number

    Gutter.

  • Parameters

    • projection: Projection

      Projection.

    Returns number

    Gutter.

  • Get the imagery set associated with this source.

    Returns string

    The imagery set.

    Api

  • Returns boolean

    Use linear interpolation when resampling.

  • Return the key to be used for all tiles in the source.

    Returns string

    The key for all tiles.

  • Get a list of object property names.

    Returns string[]

    List of property names.

    Api

  • Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

    Parameters

    • type: string

      Type.

    Returns undefined | Listener[]

    Listeners.

  • Parameters

    • projection: Projection

      Projection.

    Returns boolean

    Opaque.

  • Get the projection of the source.

    Returns null | Projection

    Projection.

    Api

  • Get an object of all property names and values.

    Returns {
        [x: string]: any;
    }

    Object.

    • [x: string]: any

    Api

  • Get an object of all property names and values.

    Returns null | {
        [x: string]: any;
    }

    Object.

  • Parameters

    • Optional projection: Projection

      Projection.

    Returns null | number[]

    Resolutions.

  • Get the version number for this object. Each time the object is modified, its version number will be incremented.

    Returns number

    Revision.

    Api

  • Get the state of the source, see import("./Source.js").State for possible states.

    Returns State

    State.

    Api

  • Parameters

    • z: number

      Tile coordinate z.

    • x: number

      Tile coordinate x.

    • y: number

      Tile coordinate y.

    • pixelRatio: number

      Pixel ratio.

    • projection: Projection

      Projection.

    Returns ImageTile | ReprojTile

    Tile.

  • Returns a tile coordinate wrapped around the x-axis. When the tile coordinate is outside the resolution and extent range of the tile grid, null will be returned.

    Parameters

    • tileCoord: TileCoord

      Tile coordinate.

    • Optional projection: Projection

      Projection.

    Returns TileCoord

    Tile coordinate to be passed to the tileUrlFunction or null if no tile URL should be created for the passed tileCoord.

  • Return the tile grid of the tile source.

    Returns null | TileGrid

    Tile grid.

    Api

  • Parameters

    • projection: Projection

      Projection.

    Returns TileGrid

    Tile grid.

  • Protected

    Parameters

    • z: number

      Tile coordinate z.

    • x: number

      Tile coordinate x.

    • y: number

      Tile coordinate y.

    • pixelRatio: number

      Pixel ratio.

    • projection: Projection

      Projection.

    Returns ImageTile

    Tile.

  • Return the tile load function of the source.

    Returns LoadFunction

    TileLoadFunction

    Api

  • Get the tile pixel ratio for this source. Subclasses may override this method, which is meant to return a supported pixel ratio that matches the provided pixelRatio as close as possible.

    Parameters

    • pixelRatio: number

      Pixel ratio.

    Returns number

    Tile pixel ratio.

  • Parameters

    • z: number

      Z.

    • pixelRatio: number

      Pixel ratio.

    • projection: Projection

      Projection.

    Returns Size

    Tile size.

  • Return the tile URL function of the source.

    Returns UrlFunction

    TileUrlFunction

    Api

  • Return the URLs used for this source. When a tileUrlFunction is used instead of url or urls, null will be returned.

    Returns null | string[]

    URLs.

    Api

  • Returns Promise<ViewOptions>

    A promise for view-related properties.

  • Returns undefined | boolean

    Wrap X.

  • Parameters

    • response: BingMapsImageryMetadataResponse

      Response.

    Returns void

  • Protected

    Handle tile change events.

    Parameters

    • event: BaseEvent

      Event.

    Returns void

  • Parameters

    • Optional type: string

      Type. If not provided, true will be returned if this event target has any listeners.

    Returns boolean

    Has listeners.

  • Returns boolean

    The object has properties.

  • Parameters

    • key: string

      Key name.

    • oldValue: any

      Old value.

    Returns void

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns EventsKey | EventsKey[]

    Event key.

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns EventsKey | EventsKey[]

    Event key.

  • Refreshes the source. The source will be cleared, and data from the server will be reloaded.

    Returns void

    Api

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optional silent: boolean

      Update without triggering an event.

    Returns void

    Api

  • Set the attributions of the source.

    Parameters

    • attributions: undefined | AttributionLike

      Attributions. Can be passed as string, Array<string>, module:ol/source/Source~Attribution, or undefined.

    Returns void

    Api

  • Protected

    Set the value to be used as the key for all tiles in the source.

    Parameters

    • key: string

      The key for tiles.

    Returns void

  • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

    Parameters

    • values: {
          [x: string]: any;
      }

      Values.

      • [x: string]: any
    • Optional silent: boolean

      Update without triggering an event.

    Returns void

    Api

  • Sets whether to render reprojection edges or not (usually for debugging).

    Parameters

    • render: boolean

      Render the edges.

    Returns void

    Api

  • Set the state of the source.

    Parameters

    • state: State

      State.

    Returns void

  • Sets the tile grid to use when reprojecting the tiles to the given projection instead of the default tile grid for the projection.

    This can be useful when the default tile grid cannot be created (e.g. projection has no extent defined) or for optimization reasons (custom tile size, resolutions, ...).

    Parameters

    • projection: ProjectionLike

      Projection.

    • tilegrid: TileGrid

      Tile grid to use for the projection.

    Returns void

    Api

  • Set the tile load function of the source.

    Parameters

    • tileLoadFunction: LoadFunction

      Tile load function.

    Returns void

    Api

  • Set the tile URL function of the source.

    Parameters

    • tileUrlFunction: UrlFunction

      Tile URL function.

    • Optional key: string

      Optional new tile key for the source.

    Returns void

    Api

  • Set the URL to use for requests.

    Parameters

    • url: string

      URL.

    Returns void

    Api

  • Set the URLs to use for requests.

    Parameters

    • urls: string[]

      URLs.

    Returns void

    Api

  • Parameters

    • tileCoord: TileCoord

      Tile coordinate.

    • pixelRatio: number

      Pixel ratio.

    • projection: Projection

      Projection.

    Returns undefined | string

    Tile URL.

  • Protected

    Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      Type.

    • listener: ((arg0) => unknown)

      Listener.

        • (arg0): unknown
        • Parameters

          • arg0: Event | BaseEvent

          Returns unknown

    Returns void

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optional silent: boolean

      Unset without triggering an event.

    Returns void

    Api

  • Increases the cache size if needed

    Parameters

    • tileCount: number

      Minimum number of tiles needed.

    • projection: Projection

      Projection.

    Returns void

  • Marks a tile coord as being used, without triggering a load.

    Parameters

    • z: number

      Tile coordinate z.

    • x: number

      Tile coordinate x.

    • y: number

      Tile coordinate y.

    Returns void