Skip to content

Class: ImageSource

Hierarchy

  • EventEmitter

    ImageSource

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ImageSource(id, options): ImageSource

Parameters

NameType
idany
optionsImageSourceOptions

Returns

ImageSource

Overrides

EventEmitter.constructor

Defined in

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

Properties

id

id: string

数据源 id

Defined in

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


type

type: image

数据源类型

Defined in

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


minZoom

minZoom: number

支持的最小层级

Defined in

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


maxZoom

maxZoom: number

支持的最大层级

Defined in

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


roundZoom

roundZoom: boolean

是否对层级进行四舍五入

Defined in

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


tileSize

tileSize: number

瓦片大小

Defined in

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


options

options: ImageSourceOptions

配置项

Defined in

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


url

url: string | [string, string]

Defined in

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


renderer

renderer: Renderer

Defined in

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


dispatcher

dispatcher: any

Defined in

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


layer

layer: WithNull<BaseLayer>

Defined in

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


parseOptions

parseOptions: ParseOptionsType

Defined in

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


coordinates

coordinates: Coordinates

影像坐标

Defined in

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


wrapX

wrapX: boolean

是否跨世界渲染

Defined in

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

Accessors

sourceCache

get sourceCache(): SourceCache

Returns

SourceCache

Defined in

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

Methods

onAdd

onAdd(layer, cb?): void

Parameters

NameType
layerany
cb?any

Returns

void

Defined in

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


prepare

prepare(renderer, dispatcher, parseOptions): void

Parameters

NameType
rendererRenderer
dispatcherany
parseOptionsParseOptionsType

Returns

void

Defined in

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


update

update(data, clear?): void

Parameters

NameType
dataImageSourceInterval
clear?boolean

Returns

void

Defined in

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


updateImage

updateImage(options, clear?): void

Parameters

NameType
optionsPick<ImageSourceOptions, "url" | "coordinates">
clear?boolean

Returns

void

Defined in

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


setCoordinates

setCoordinates(coordinates): void

Parameters

NameType
coordinatesCoordinates

Returns

void

Defined in

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


asyncActor

asyncActor(tile, url): Promise<unknown>

Parameters

NameType
tileany
urlany

Returns

Promise<unknown>

Defined in

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


load

load(cb?): void

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

Parameters

NameType
cb?any

Returns

void

Defined in

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


loaded

loaded(): boolean

Returns

boolean

Defined in

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


reload

reload(clear): void

Parameters

NameType
clearany

Returns

void

Defined in

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


getTileUrl

getTileUrl(tileID): string[]

Parameters

NameType
tileIDany

Returns

string[]

Defined in

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


loadTile

loadTile(tile, callback): any

Parameters

NameType
tileTile
callbackany

Returns

any

Defined in

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


hasTile

hasTile(coord): boolean

Parameters

NameType
coordany

Returns

boolean

Defined in

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


getFadeTime

getFadeTime(): number

Returns

number

Defined in

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


abortTile

abortTile(tile, callback): void

Parameters

NameType
tileTile
callbackany

Returns

void

Defined in

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


unloadTile

unloadTile(tile, cb): void

Parameters

NameType
tileany
cbany

Returns

void

Defined in

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


destroy

destroy(): void

Returns

void

Defined in

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

Released under the MIT License.