Skip to content

Class: Layer

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Layer(id, source, options?): Layer

Parameters

NameType
idstring
sourceSourceType
options?LayerOptions

Returns

Layer

Defined in

maplibre-gl/src/layer.ts:31

Properties

gl

gl: null | WebGLRenderingContext | WebGL2RenderingContext

Defined in

maplibre-gl/src/layer.ts:18


map

map: WithNull<Map>

Defined in

maplibre-gl/src/layer.ts:19


id

id: string

Defined in

maplibre-gl/src/layer.ts:20


type

type: string

Defined in

maplibre-gl/src/layer.ts:21


renderingMode

renderingMode: "2d" | "3d"

Defined in

maplibre-gl/src/layer.ts:22


sync

sync: default

Defined in

maplibre-gl/src/layer.ts:23


scene

scene: Scene

Defined in

maplibre-gl/src/layer.ts:24


planeCamera

planeCamera: OrthographicCamera

Defined in

maplibre-gl/src/layer.ts:25


renderer

renderer: Renderer

Defined in

maplibre-gl/src/layer.ts:26

Accessors

camera

get camera(): OrthographicCamera | PerspectiveCamera

Returns

OrthographicCamera | PerspectiveCamera

Defined in

maplibre-gl/src/layer.ts:48

Methods

update

update(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:52


moveStart

moveStart(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:59


moveEnd

moveEnd(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:65


handleResize

handleResize(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:71


handleZoom

handleZoom(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:83


updateOptions

updateOptions(options): void

Parameters

NameType
optionsPartial<LayerOptions>

Returns

void

Defined in

maplibre-gl/src/layer.ts:89


getMask

getMask(): any

Returns

any

Defined in

maplibre-gl/src/layer.ts:99


setMask

setMask(mask): void

Parameters

NameType
maskany

Returns

void

Defined in

maplibre-gl/src/layer.ts:170


onAdd

onAdd(m, gl): void

Parameters

NameType
mMap
glWebGLRenderingContext

Returns

void

Defined in

maplibre-gl/src/layer.ts:178


calcWrappedWorlds

calcWrappedWorlds(): number[]

Returns

number[]

Defined in

maplibre-gl/src/layer.ts:397


onRemove

onRemove(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:426


prerender

prerender(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:441


picker

picker(coordinates): Promise<any>

Parameters

NameType
coordinatesany

Returns

Promise<any>

Defined in

maplibre-gl/src/layer.ts:453


render

render(): void

Returns

void

Defined in

maplibre-gl/src/layer.ts:466

Released under the MIT License.