Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MVTLayerOptions

Options to configure a MVTLayer.

Hierarchy

Index

Properties

Optional margin

margin: number

tileMargin that should be applied to all providers of the layer.

Optional max

max: number

maximum zoom level at which data from the TileLayer will be displayed.

Optional min

min: number

minimum zoom level at which data from the TileLayer will be displayed.

Optional name

name: string

Name of the TileLayer.

Optional pointerEvents

pointerEvents: boolean

Determines whether pointer events are enabled for all features of the layer.

defaultvalue

false

Optional provider

provider: TileProvider | { max: number; min: number; provider: TileProvider }[]

The data provider(s) for the TileLayer.

The provider can either be a single TileProvider or an array of {min: number, max: number, provider: TileProvider}, where "min" and "max" define the minimum and maximum zoom level at which data from the "provider" should be used. If a single provider is defined, it's data will be used for all zoom levels. If several providers are defined for a single zoom level, only the data of the first defined is used.

remote

remote: { max?: number; min?: number; tileSize?: number; url: string | ((z: number, y: number, x: number, quadkey: string) => string) }

options to configure the remote MVT datasource

Type declaration

  • Optional max?: number

    The maximum zoom level for loading map tiles

    defaultvalue

    16

  • Optional min?: number

    The minimum zoom level for loading map tiles

    defaultvalue

    1

  • Optional tileSize?: number

    defines the size of the mvt tile data in pixel.

    defaultvalue

    512

  • url: string | ((z: number, y: number, x: number, quadkey: string) => string)

    URL to the remote MVT endpoint.

    It is either a string which may contain the following flags that will be replaced:

    • {SUBDOMAIN_CHAR}: subdomain id(a, b, c and d) for balancing the load
    • {SUBDOMAIN_INT}: subdomain id(0, 1, 2 and 3) for balancing the load
    • {SUBDOMAIN_INT_1_4}: subdomain id(1, 2, 3 and 4) for balancing the load
    • {QUADKEY}: quadkey of the tile to be requested
    • {Z}: z of the tile to be requested
    • {X}: x of the tile to be requested
    • {Y}: y of the tile to be requested

    or a callback function that's called with the following parameters z,y,x,quadkey and needs to return the url for the respective tile. The callback function needs to handle custom parameters by its own.

    example
    // string
    url: 'https://xyz.api.here.com/tiles/osmbase/512/all/{z}/{x}/{y}.mvt?access_token=YOUR_ACCESS_TOKEN'
    
    // callback function
    url: (z, y, x, quadkey) => {
        return `https://xyz.api.here.com/tiles/osmbase/512/all/${z}/${x}/${y}.mvt?access_token=YOUR_ACCESS_TOKEN`
    }
    

Optional style

style: LayerStyle

Style for rendering features in this layer.

Optional tileSize

tileSize: number

the size of the tile data in pixel.

defaultvalue

512

Optional visible

visible: boolean

Indicates whether the layer should be visible (true) or hidden (false).

defaultvalue

true

Generated using TypeDoc