Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TileLayerOptions

Configuration options for a TileLayer.

Hierarchy

Index

Properties

Optional attribution

Attribution information for data sources used by this layer.

Attributions are automatically displayed or hidden depending on whether the corresponding data is currently active or visible on the map — e.g., based on zoom level, layer visibility, or usage. This ensures that only active data providers are credited, as required by licensing.

Can be a simple string (displayed as static text), or an array of structured attribution entries that support clickable labels and optional tooltips.

example

// Simple attribution string attribution: "© Data Provider"

example

// Multiple detailed attributions attribution: [ { label: "© Elevation Provider", url: "https://elevation.example.com", title: "Elevation data source" }, { label: "Imagery © HERE Maps", url: "https://www.here.com", title: "Satellite imagery by HERE" } ]

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

true

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.

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