Class: WebglLayer ¶
Hierarchy ¶
BaseLayer
↳
WebglLayer
Table of contents ¶
Constructors ¶
Properties ¶
- options
- _updating
- _layerId
- devicePixelRatio
- _width
- _height
- canvas
- gl
- renderer
- scene
- sync
- planeCamera
- viewState
- layer
- _tileZoom
- _wrapX
- _wrapY
- _globalTileRange
- _currentTiles
- _unLimitTiles
Accessors ¶
Methods ¶
- _createCanvas
- _reset
- _onResize
- _zoomStart
- _moveStart
- project
- unproject
- intersectsCoordinate
- onAdd
- initialize
- _resizeCanvas
- getTileSize
- _redraw
- _render
- glPrerender
- glRender
- picker
- calcWrappedWorlds
- _resetView
- _resetGrid
- _setView
- _tileCoordsToBounds
- _tileCoordsToNwSe
- _isValidTile
- _wrapCoords
- _update
- _getTiledPixelBounds
- _pxBoundsToTileRange
- handleZoom
- onMoveEnd
- onMoveStart
- _animateZoom
- getEvents
- updateOptions
- getMask
- setMask
- onRemove
Constructors ¶
constructor ¶
• new WebglLayer(id
, data
, options
): WebglLayer
Parameters ¶
Name | Type |
---|---|
id | string | number |
data | any |
options | any |
Returns ¶
Inherited from ¶
BaseLayer.constructor
Defined in ¶
Properties ¶
options ¶
• options: any
Inherited from ¶
BaseLayer.options
Defined in ¶
_updating ¶
• _updating: boolean
Inherited from ¶
BaseLayer._updating
Defined in ¶
_layerId ¶
• _layerId: string
| number
Inherited from ¶
BaseLayer._layerId
Defined in ¶
devicePixelRatio ¶
• devicePixelRatio: number
Inherited from ¶
BaseLayer.devicePixelRatio
Defined in ¶
_width ¶
• _width: number
Inherited from ¶
BaseLayer._width
Defined in ¶
_height ¶
• _height: number
Inherited from ¶
BaseLayer._height
Defined in ¶
canvas ¶
• canvas: null
| HTMLCanvasElement
Inherited from ¶
BaseLayer.canvas
Defined in ¶
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 ¶
Name | Type |
---|---|
id | string | number |
zIndex | number |
Returns ¶
HTMLCanvasElement
Inherited from ¶
BaseLayer._createCanvas
Defined in ¶
_reset ¶
▸ _reset(): void
Returns ¶
void
Inherited from ¶
BaseLayer._reset
Defined in ¶
_onResize ¶
▸ _onResize(resizeEvent
): void
Parameters ¶
Name | Type |
---|---|
resizeEvent | ResizeEvent |
Returns ¶
void
Inherited from ¶
BaseLayer._onResize
Defined in ¶
_zoomStart ¶
▸ _zoomStart(): void
Returns ¶
void
Inherited from ¶
BaseLayer._zoomStart
Defined in ¶
_moveStart ¶
▸ _moveStart(): void
Returns ¶
void
Inherited from ¶
BaseLayer._moveStart
Defined in ¶
project ¶
▸ project(coordinate
): [number
, number
]
Parameters ¶
Name | Type |
---|---|
coordinate | [number , number ] |
Returns ¶
[number
, number
]
Inherited from ¶
BaseLayer.project
Defined in ¶
unproject ¶
▸ unproject(pixel
): [number
, number
]
Parameters ¶
Name | Type |
---|---|
pixel | [number , number ] |
Returns ¶
[number
, number
]
Inherited from ¶
BaseLayer.unproject
Defined in ¶
intersectsCoordinate ¶
▸ intersectsCoordinate(coordinate
): boolean
Parameters ¶
Name | Type |
---|---|
coordinate | [number , number ] |
Returns ¶
boolean
Inherited from ¶
BaseLayer.intersectsCoordinate
Defined in ¶
onAdd ¶
▸ onAdd(map
): WebglLayer
Parameters ¶
Name | Type |
---|---|
map | Map |
Returns ¶
Inherited from ¶
BaseLayer.onAdd
Defined in ¶
initialize ¶
▸ initialize(id
, source
, options
): void
Parameters ¶
Name | Type |
---|---|
id | string | number |
source | any |
options | any |
Returns ¶
void
Overrides ¶
BaseLayer.initialize
Defined in ¶
leaflet/src/layer/webgl.ts:133
_resizeCanvas ¶
▸ _resizeCanvas(scale
): void
Parameters ¶
Name | Type |
---|---|
scale | number |
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 ¶
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 ¶
Name | Type |
---|---|
coordinates | any |
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 ¶
Name | Type |
---|---|
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 ¶
Name | Type |
---|---|
center | LatLng |
zoom | number |
noPrune? | boolean |
noUpdate? | boolean |
Returns ¶
void
Defined in ¶
leaflet/src/layer/webgl.ts:445
_tileCoordsToBounds ¶
▸ _tileCoordsToBounds(coords
): LatLngBounds
Parameters ¶
Name | Type |
---|---|
coords | any |
Returns ¶
LatLngBounds
Defined in ¶
leaflet/src/layer/webgl.ts:473
_tileCoordsToNwSe ¶
▸ _tileCoordsToNwSe(coords
): LatLng
[]
Parameters ¶
Name | Type |
---|---|
coords | any |
Returns ¶
LatLng
[]
Defined in ¶
leaflet/src/layer/webgl.ts:483
_isValidTile ¶
▸ _isValidTile(coords
): boolean
Parameters ¶
Name | Type |
---|---|
coords | any |
Returns ¶
boolean
Defined in ¶
leaflet/src/layer/webgl.ts:493
_wrapCoords ¶
▸ _wrapCoords(coords
): Point
Parameters ¶
Name | Type |
---|---|
coords | any |
Returns ¶
Point
Defined in ¶
leaflet/src/layer/webgl.ts:510
_update ¶
▸ _update(center?
): undefined
| any
[]
Parameters ¶
Name | Type |
---|---|
center? | LatLng |
Returns ¶
undefined
| any
[]
Defined in ¶
leaflet/src/layer/webgl.ts:521
_getTiledPixelBounds ¶
▸ _getTiledPixelBounds(center
, zoom
): Bounds
Parameters ¶
Name | Type |
---|---|
center | LatLng |
zoom | number |
Returns ¶
Bounds
Defined in ¶
leaflet/src/layer/webgl.ts:610
_pxBoundsToTileRange ¶
▸ _pxBoundsToTileRange(bounds
): Bounds
Parameters ¶
Name | Type |
---|---|
bounds | Bounds |
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 ¶
Name | Type |
---|---|
event | ZoomAnimEvent |
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 ¶
Name | Type |
---|---|
options | Partial <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 ¶
Name | Type |
---|---|
mask | any |
Returns ¶
void
Defined in ¶
leaflet/src/layer/webgl.ts:759
onRemove ¶
▸ onRemove(): WebglLayer
Returns ¶
Overrides ¶
BaseLayer.onRemove