Class HeightDebugProvider

Height debug provider takes a RGB encoded height map from another provider and converts it to a gradient for preview.

Usefull to preview and compare height of different providers. Can also be usefull to generate grayscale maps to be feed into other libraries (e.g. physics engine).

Hierarchy

Constructors

Properties

bounds: number[] = []

Map bounds.

center: number[] = []

Map center point.

fromColor: Color = ...

Initial color to be used for lower values.

maxZoom: number = 20

Maximum tile level.

minZoom: number = 0

Minimum tile level.

name: string = ''

Name of the map provider

provider: MapProvider

The provider used to retrieve the base RGB information to be debugged.

toColor: Color = ...

Final color to be used for higher values.

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>

Generated using TypeDoc