Class: TileSource ¶
Hierarchy ¶
EventEmitter
↳
TileSource
Table of contents ¶
Constructors ¶
Properties ¶
- id
- type
- minZoom
- maxZoom
- roundZoom
- scheme
- url
- tileSize
- tileBounds
- options
- renderer
- dispatcher
- layer
- wrapX
- parseOptions
Accessors ¶
Methods ¶
- onAdd
- update
- prepare
- load
- loaded
- reload
- hasTile
- getFadeTime
- getUrl
- asyncActor
- getTileUrl
- loadTile
- abortTile
- unloadTile
- destroy
Constructors ¶
constructor ¶
• new TileSource(id
, options
): TileSource
Parameters ¶
Name | Type |
---|---|
id | any |
options | TileSourceOptions |
Returns ¶
Overrides ¶
EventEmitter.constructor
Defined in ¶
Properties ¶
id ¶
• id: string
数据源 id
Defined in ¶
type ¶
• type: tile
数据源类型
Defined in ¶
minZoom ¶
• minZoom: number
支持的最小层级
Defined in ¶
maxZoom ¶
• maxZoom: number
支持的最大层级
Defined in ¶
roundZoom ¶
• roundZoom: boolean
= false
生成瓦片时的配置
Defined in ¶
scheme ¶
• scheme: "xyz"
| "tms"
瓦片规范
Defined in ¶
url ¶
• url: string
| string
[]
Defined in ¶
tileSize ¶
• tileSize: number
瓦片大小
Defined in ¶
tileBounds ¶
• tileBounds: undefined
| Bounds
Defined in ¶
options ¶
• options: TileSourceOptions
配置项
Defined in ¶
renderer ¶
• renderer: Renderer
Defined in ¶
dispatcher ¶
• dispatcher: any
Defined in ¶
layer ¶
• layer: WithNull
<BaseLayer
>
Defined in ¶
wrapX ¶
• wrapX: boolean
是否跨世界渲染
Defined in ¶
parseOptions ¶
• parseOptions: ParseOptionsType
Defined in ¶
Accessors ¶
sourceCache ¶
• get
sourceCache(): default
Returns ¶
default
Defined in ¶
gl-core/src/source/tile.ts:118
Methods ¶
onAdd ¶
▸ onAdd(layer
, cb?
): void
Parameters ¶
Name | Type |
---|---|
layer | any |
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:122
update ¶
▸ update(data
, clear?
): this
Parameters ¶
Name | Type | Default value |
---|---|---|
data | TileSourceInterval | undefined |
clear | boolean | true |
Returns ¶
this
Defined in ¶
gl-core/src/source/tile.ts:127
prepare ¶
▸ prepare(renderer
, dispatcher
, parseOptions
): void
Parameters ¶
Name | Type |
---|---|
renderer | Renderer |
dispatcher | any |
parseOptions | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:134
load ¶
▸ load(cb?
): void
兼容 TileJSON 加载,需要具体实现
Parameters ¶
Name | Type |
---|---|
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:144
loaded ¶
▸ loaded(): boolean
Returns ¶
boolean
Defined in ¶
gl-core/src/source/tile.ts:152
reload ¶
▸ reload(clear
): void
Parameters ¶
Name | Type |
---|---|
clear | boolean |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:156
hasTile ¶
▸ hasTile(coord
): boolean
Parameters ¶
Name | Type |
---|---|
coord | TileID |
Returns ¶
boolean
Defined in ¶
gl-core/src/source/tile.ts:168
getFadeTime ¶
▸ getFadeTime(): number
Returns ¶
number
Defined in ¶
gl-core/src/source/tile.ts:172
getUrl ¶
▸ getUrl(x
, y
, z
): string
| string
[]
Parameters ¶
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns ¶
string
| string
[]
Defined in ¶
gl-core/src/source/tile.ts:176
asyncActor ¶
▸ asyncActor(tile
, url
): Promise
<unknown
>
Parameters ¶
Name | Type |
---|---|
tile | Tile |
url | string |
Returns ¶
Promise
<unknown
>
Defined in ¶
gl-core/src/source/tile.ts:207
getTileUrl ¶
▸ getTileUrl(tileID
): string
[]
Parameters ¶
Name | Type |
---|---|
tileID | TileID |
Returns ¶
string
[]
Defined in ¶
gl-core/src/source/tile.ts:229
loadTile ¶
▸ loadTile(tile
, callback
): any
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
any
Defined in ¶
gl-core/src/source/tile.ts:244
abortTile ¶
▸ abortTile(tile
, callback
): void
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:290
unloadTile ¶
▸ unloadTile(tile
, callback
): void
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/tile.ts:319
destroy ¶
▸ destroy(): void
Returns ¶
void