Skip to content

Class: WebglLayer

Hierarchy

  • BaseLayer

    WebglLayer

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new WebglLayer(id, data, options): WebglLayer

Parameters

NameType
idstring | number
dataany
optionsany

Returns

WebglLayer

Inherited from

BaseLayer.constructor

Defined in

leaflet/src/layer/Base.ts:13

Properties

options

options: any

Inherited from

BaseLayer.options

Defined in

leaflet/src/layer/Base.ts:5


_updating

_updating: boolean

Inherited from

BaseLayer._updating

Defined in

leaflet/src/layer/Base.ts:6


_layerId

_layerId: string | number

Inherited from

BaseLayer._layerId

Defined in

leaflet/src/layer/Base.ts:7


devicePixelRatio

devicePixelRatio: number

Inherited from

BaseLayer.devicePixelRatio

Defined in

leaflet/src/layer/Base.ts:8


_width

_width: number

Inherited from

BaseLayer._width

Defined in

leaflet/src/layer/Base.ts:9


_height

_height: number

Inherited from

BaseLayer._height

Defined in

leaflet/src/layer/Base.ts:10


canvas

canvas: null | HTMLCanvasElement

Inherited from

BaseLayer.canvas

Defined in

leaflet/src/layer/Base.ts:11


gl

gl: null | WebGL2RenderingContext | WebGLRenderingContext

Defined in

leaflet/src/layer/webgl.ts:118


renderer

renderer: Renderer

Defined in

leaflet/src/layer/webgl.ts:119


scene

scene: Scene

Defined in

leaflet/src/layer/webgl.ts:120


sync

sync: default

Defined in

leaflet/src/layer/webgl.ts:121


planeCamera

planeCamera: OrthographicCamera

Defined in

leaflet/src/layer/webgl.ts:122


viewState

viewState: ViewState

Defined in

leaflet/src/layer/webgl.ts:123


layer

layer: BaseLayer

Defined in

leaflet/src/layer/webgl.ts:124


_tileZoom

_tileZoom: undefined | number

Defined in

leaflet/src/layer/webgl.ts:125


_wrapX

_wrapX: undefined | false | number[]

Defined in

leaflet/src/layer/webgl.ts:126


_wrapY

_wrapY: undefined | false | number[]

Defined in

leaflet/src/layer/webgl.ts:127


_globalTileRange

_globalTileRange: any

Defined in

leaflet/src/layer/webgl.ts:128


_currentTiles

_currentTiles: any[]

Defined in

leaflet/src/layer/webgl.ts:129


_unLimitTiles

_unLimitTiles: any[]

Defined in

leaflet/src/layer/webgl.ts:130

Accessors

camera

get camera(): OrthographicCamera | PerspectiveCamera

Returns

OrthographicCamera | PerspectiveCamera

Defined in

leaflet/src/layer/webgl.ts:158

Methods

_createCanvas

_createCanvas(id, zIndex): HTMLCanvasElement

Parameters

NameType
idstring | number
zIndexnumber

Returns

HTMLCanvasElement

Inherited from

BaseLayer._createCanvas

Defined in

leaflet/src/layer/Base.ts:33


_reset

_reset(): void

Returns

void

Inherited from

BaseLayer._reset

Defined in

leaflet/src/layer/Base.ts:45


_onResize

_onResize(resizeEvent): void

Parameters

NameType
resizeEventResizeEvent

Returns

void

Inherited from

BaseLayer._onResize

Defined in

leaflet/src/layer/Base.ts:52


_zoomStart

_zoomStart(): void

Returns

void

Inherited from

BaseLayer._zoomStart

Defined in

leaflet/src/layer/Base.ts:60


_moveStart

_moveStart(): void

Returns

void

Inherited from

BaseLayer._moveStart

Defined in

leaflet/src/layer/Base.ts:64


project

project(coordinate): [number, number]

Parameters

NameType
coordinate[number, number]

Returns

[number, number]

Inherited from

BaseLayer.project

Defined in

leaflet/src/layer/Base.ts:92


unproject

unproject(pixel): [number, number]

Parameters

NameType
pixel[number, number]

Returns

[number, number]

Inherited from

BaseLayer.unproject

Defined in

leaflet/src/layer/Base.ts:97


intersectsCoordinate

intersectsCoordinate(coordinate): boolean

Parameters

NameType
coordinate[number, number]

Returns

boolean

Inherited from

BaseLayer.intersectsCoordinate

Defined in

leaflet/src/layer/Base.ts:102


onAdd

onAdd(map): WebglLayer

Parameters

NameType
mapMap

Returns

WebglLayer

Inherited from

BaseLayer.onAdd

Defined in

leaflet/src/layer/Base.ts:107


initialize

initialize(id, source, options): void

Parameters

NameType
idstring | number
sourceany
optionsany

Returns

void

Overrides

BaseLayer.initialize

Defined in

leaflet/src/layer/webgl.ts:133


_resizeCanvas

_resizeCanvas(scale): void

Parameters

NameType
scalenumber

Returns

void

Overrides

BaseLayer._resizeCanvas

Defined in

leaflet/src/layer/webgl.ts:144


getTileSize

getTileSize(): Point

Returns

Point

Defined in

leaflet/src/layer/webgl.ts:162


_redraw

_redraw(): WebglLayer

Returns

WebglLayer

Overrides

BaseLayer._redraw

Defined in

leaflet/src/layer/webgl.ts:167


_render

_render(): void

Returns

void

Overrides

BaseLayer._render

Defined in

leaflet/src/layer/webgl.ts:183


glPrerender

glPrerender(): void

Returns

void

Defined in

leaflet/src/layer/webgl.ts:377


glRender

glRender(): void

Returns

void

Defined in

leaflet/src/layer/webgl.ts:389


picker

picker(coordinates): Promise<any>

Parameters

NameType
coordinatesany

Returns

Promise<any>

Defined in

leaflet/src/layer/webgl.ts:401


calcWrappedWorlds

calcWrappedWorlds(): number[]

Returns

number[]

Defined in

leaflet/src/layer/webgl.ts:414


_resetView

_resetView(e?): void

Parameters

NameType
e?any

Returns

void

Overrides

BaseLayer._resetView

Defined in

leaflet/src/layer/webgl.ts:418


_resetGrid

_resetGrid(): void

Returns

void

Defined in

leaflet/src/layer/webgl.ts:423


_setView

_setView(center, zoom, noPrune?, noUpdate?): void

Parameters

NameType
centerLatLng
zoomnumber
noPrune?boolean
noUpdate?boolean

Returns

void

Defined in

leaflet/src/layer/webgl.ts:445


_tileCoordsToBounds

_tileCoordsToBounds(coords): LatLngBounds

Parameters

NameType
coordsany

Returns

LatLngBounds

Defined in

leaflet/src/layer/webgl.ts:473


_tileCoordsToNwSe

_tileCoordsToNwSe(coords): LatLng[]

Parameters

NameType
coordsany

Returns

LatLng[]

Defined in

leaflet/src/layer/webgl.ts:483


_isValidTile

_isValidTile(coords): boolean

Parameters

NameType
coordsany

Returns

boolean

Defined in

leaflet/src/layer/webgl.ts:493


_wrapCoords

_wrapCoords(coords): Point

Parameters

NameType
coordsany

Returns

Point

Defined in

leaflet/src/layer/webgl.ts:510


_update

_update(center?): undefined | any[]

Parameters

NameType
center?LatLng

Returns

undefined | any[]

Defined in

leaflet/src/layer/webgl.ts:521


_getTiledPixelBounds

_getTiledPixelBounds(center, zoom): Bounds

Parameters

NameType
centerLatLng
zoomnumber

Returns

Bounds

Defined in

leaflet/src/layer/webgl.ts:610


_pxBoundsToTileRange

_pxBoundsToTileRange(bounds): Bounds

Parameters

NameType
boundsBounds

Returns

Bounds

Defined in

leaflet/src/layer/webgl.ts:621


handleZoom

handleZoom(): void

Returns

void

Defined in

leaflet/src/layer/webgl.ts:629


onMoveEnd

onMoveEnd(): void

Returns

void

Overrides

BaseLayer.onMoveEnd

Defined in

leaflet/src/layer/webgl.ts:636


onMoveStart

onMoveStart(): void

Returns

void

Defined in

leaflet/src/layer/webgl.ts:647


_animateZoom

_animateZoom(event): void

Parameters

NameType
eventZoomAnimEvent

Returns

void

Overrides

BaseLayer._animateZoom

Defined in

leaflet/src/layer/webgl.ts:653


getEvents

getEvents(): Record<string, any>

Returns

Record<string, any>

Overrides

BaseLayer.getEvents

Defined in

leaflet/src/layer/webgl.ts:659


updateOptions

updateOptions(options): void

Parameters

NameType
optionsPartial<LayerOptions>

Returns

void

Defined in

leaflet/src/layer/webgl.ts:676


getMask

getMask(): any

Returns

any

Defined in

leaflet/src/layer/webgl.ts:688


setMask

setMask(mask): void

Parameters

NameType
maskany

Returns

void

Defined in

leaflet/src/layer/webgl.ts:759


onRemove

onRemove(): WebglLayer

Returns

WebglLayer

Overrides

BaseLayer.onRemove

Defined in

leaflet/src/layer/webgl.ts:767

Released under the MIT License.