Class MapProviderAbstract

A map provider is a object that handles the access to map tiles of a specific service.

They contain the access configuration and are responsible for handling the map theme size etc.

MapProvider should be used as a base for all the providers.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

bounds: number[] = []

Map bounds.

center: number[] = []

Map center point.

maxZoom: number = 20

Maximum tile level.

minZoom: number = 0

Minimum tile level.

name: string = ''

Name of the map provider

Methods

  • Get a tile for the x, y, zoom based on the provider configuration.

    The tile should be returned as a image object, compatible with canvas context 2D drawImage() and with webgl texImage2D() method.

    Returns

    Promise with the image obtained for the tile ready to use.

    Parameters

    • zoom: number

      Zoom level.

    • x: number

      Tile x.

    • y: number

      Tile y.

    Returns Promise<any>

  • Get map meta data from server if supported.

    Usually map server have API method to retrieve TileJSON metadata.

    Returns Promise<void>

Generated using TypeDoc