Class MapProvider

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.

Constructors

  • Parameters

    • layers: MapProviderLayer | MapProviderLayer[]
    • Optional options: MapProviderParameters

    Returns MapProvider

Properties

bounds?: Box2

Map bounds.

layers: MapProviderLayer[] = []
mapView: MapView

Name of the map provider

maxZoom: number = 22

Maximum tile level.

minZoom: number = 0

Minimum tile level.

name: string = ''

Name of the map provider

options?: MapProviderParameters

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.

    Parameters

    • zoom: number

      Zoom level.

    • x: number

      Tile x.

    • y: number

      Tile y.

    Returns {
        layers: MapProviderLayer[];
        promise: Promise<any>;
    }

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

    • layers: MapProviderLayer[]
    • promise: Promise<any>