Skip to content

Class: TileSource

Hierarchy

  • EventEmitter

    TileSource

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new TileSource(id, options): TileSource

Parameters

NameType
idany
optionsTileSourceOptions

Returns

TileSource

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

NameType
layerany
cb?any

Returns

void

Defined in

gl-core/dist/index.d.ts:655


update

update(data, clear?): this

Parameters

NameType
dataTileSourceInterval
clear?boolean

Returns

this

Defined in

gl-core/dist/index.d.ts:656


prepare

prepare(renderer, dispatcher, parseOptions): void

Parameters

NameType
rendererRenderer
dispatcherany
parseOptionsany

Returns

void

Defined in

gl-core/dist/index.d.ts:657


load

load(cb?): void

兼容 TileJSON 加载,需要具体实现

Parameters

NameType
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

NameType
clearboolean

Returns

void

Defined in

gl-core/dist/index.d.ts:664


hasTile

hasTile(coord): boolean

Parameters

NameType
coordTileID

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

NameType
xnumber
ynumber
znumber

Returns

string | string[]

Defined in

gl-core/dist/index.d.ts:667


asyncActor

asyncActor(tile, url): Promise<unknown>

Parameters

NameType
tileTile
urlstring

Returns

Promise<unknown>

Defined in

gl-core/dist/index.d.ts:668


getTileUrl

getTileUrl(tileID): string[]

Parameters

NameType
tileIDTileID

Returns

string[]

Defined in

gl-core/dist/index.d.ts:669


loadTile

loadTile(tile, callback): any

Parameters

NameType
tileTile
callbackany

Returns

any

Defined in

gl-core/dist/index.d.ts:670


abortTile

abortTile(tile, callback): void

Parameters

NameType
tileTile
callbackany

Returns

void

Defined in

gl-core/dist/index.d.ts:671


unloadTile

unloadTile(tile, callback): void

Parameters

NameType
tileTile
callbackany

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

Released under the MIT License.