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 ¶
gl-core/dist/index.d.ts:653
Properties ¶
id ¶
• id: string
数据源 id
Defined in ¶
gl-core/dist/index.d.ts:614
type ¶
• type: tile
数据源类型
Defined in ¶
gl-core/dist/index.d.ts:618
minZoom ¶
• minZoom: number
支持的最小层级
Defined in ¶
gl-core/dist/index.d.ts:622
maxZoom ¶
• maxZoom: number
支持的最大层级
Defined in ¶
gl-core/dist/index.d.ts:626
roundZoom ¶
• roundZoom: boolean
生成瓦片时的配置
Defined in ¶
gl-core/dist/index.d.ts:630
scheme ¶
• scheme: "xyz"
| "tms"
瓦片规范
Defined in ¶
gl-core/dist/index.d.ts:634
url ¶
• url: string
| string
[]
Defined in ¶
gl-core/dist/index.d.ts:635
tileSize ¶
• tileSize: number
瓦片大小
Defined in ¶
gl-core/dist/index.d.ts:639
tileBounds ¶
• tileBounds: undefined
| Bounds
Defined in ¶
gl-core/dist/index.d.ts:640
options ¶
• options: TileSourceOptions
配置项
Defined in ¶
gl-core/dist/index.d.ts:644
renderer ¶
• renderer: Renderer
Defined in ¶
gl-core/dist/index.d.ts:645
dispatcher ¶
• dispatcher: any
Defined in ¶
gl-core/dist/index.d.ts:646
layer ¶
• layer: WithNull
<BaseLayer
>
Defined in ¶
gl-core/dist/index.d.ts:647
wrapX ¶
• wrapX: boolean
是否跨世界渲染
Defined in ¶
gl-core/dist/index.d.ts:651
parseOptions ¶
• parseOptions: ParseOptionsType
Defined in ¶
gl-core/dist/index.d.ts:652
Accessors ¶
sourceCache ¶
• get
sourceCache(): SourceCache
Returns ¶
SourceCache
Defined in ¶
gl-core/dist/index.d.ts:654
Methods ¶
onAdd ¶
▸ onAdd(layer
, cb?
): void
Parameters ¶
Name | Type |
---|---|
layer | any |
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:655
update ¶
▸ update(data
, clear?
): this
Parameters ¶
Name | Type |
---|---|
data | TileSourceInterval |
clear? | boolean |
Returns ¶
this
Defined in ¶
gl-core/dist/index.d.ts:656
prepare ¶
▸ prepare(renderer
, dispatcher
, parseOptions
): void
Parameters ¶
Name | Type |
---|---|
renderer | Renderer |
dispatcher | any |
parseOptions | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:657
load ¶
▸ load(cb?
): void
兼容 TileJSON 加载,需要具体实现
Parameters ¶
Name | Type |
---|---|
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:662
loaded ¶
▸ loaded(): boolean
Returns ¶
boolean
Defined in ¶
gl-core/dist/index.d.ts:663
reload ¶
▸ reload(clear
): void
Parameters ¶
Name | Type |
---|---|
clear | boolean |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:664
hasTile ¶
▸ hasTile(coord
): boolean
Parameters ¶
Name | Type |
---|---|
coord | TileID |
Returns ¶
boolean
Defined in ¶
gl-core/dist/index.d.ts:665
getFadeTime ¶
▸ getFadeTime(): number
Returns ¶
number
Defined in ¶
gl-core/dist/index.d.ts:666
getUrl ¶
▸ getUrl(x
, y
, z
): string
| string
[]
Parameters ¶
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns ¶
string
| string
[]
Defined in ¶
gl-core/dist/index.d.ts:667
asyncActor ¶
▸ asyncActor(tile
, url
): Promise
<unknown
>
Parameters ¶
Name | Type |
---|---|
tile | Tile |
url | string |
Returns ¶
Promise
<unknown
>
Defined in ¶
gl-core/dist/index.d.ts:668
getTileUrl ¶
▸ getTileUrl(tileID
): string
[]
Parameters ¶
Name | Type |
---|---|
tileID | TileID |
Returns ¶
string
[]
Defined in ¶
gl-core/dist/index.d.ts:669
loadTile ¶
▸ loadTile(tile
, callback
): any
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
any
Defined in ¶
gl-core/dist/index.d.ts:670
abortTile ¶
▸ abortTile(tile
, callback
): void
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:671
unloadTile ¶
▸ unloadTile(tile
, callback
): void
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:672
destroy ¶
▸ destroy(): void
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:673