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/src/source/image.ts:74

Properties

id

id: string

数据源 id

Defined in

gl-core/src/source/image.ts:18


type

type: image

数据源类型

Defined in

gl-core/src/source/image.ts:23


minZoom

minZoom: number

支持的最小层级

Defined in

gl-core/src/source/image.ts:28


maxZoom

maxZoom: number

支持的最大层级

Defined in

gl-core/src/source/image.ts:33


roundZoom

roundZoom: boolean = false

是否对层级进行四舍五入

Defined in

gl-core/src/source/image.ts:38


tileSize

tileSize: number

瓦片大小

Defined in

gl-core/src/source/image.ts:43


options

options: ImageSourceOptions

配置项

Defined in

gl-core/src/source/image.ts:48


url

url: string | [string, string]

Defined in

gl-core/src/source/image.ts:50


renderer

renderer: Renderer

Defined in

gl-core/src/source/image.ts:52


dispatcher

dispatcher: any

Defined in

gl-core/src/source/image.ts:54


layer

layer: WithNull<BaseLayer>

Defined in

gl-core/src/source/image.ts:56


parseOptions

parseOptions: ParseOptionsType

Defined in

gl-core/src/source/image.ts:58


coordinates

coordinates: Coordinates

影像坐标

Defined in

gl-core/src/source/image.ts:63


wrapX

wrapX: boolean

是否跨世界渲染

Defined in

gl-core/src/source/image.ts:68

Accessors

sourceCache

get sourceCache(): default

Returns

default

Defined in

gl-core/src/source/image.ts:98

Methods

onAdd

onAdd(layer, cb?): void

Parameters

NameType
layerany
cb?any

Returns

void

Defined in

gl-core/src/source/image.ts:102


prepare

prepare(renderer, dispatcher, parseOptions): void

Parameters

NameType
rendererRenderer
dispatcherany
parseOptionsParseOptionsType

Returns

void

Defined in

gl-core/src/source/image.ts:107


update

update(data, clear?): void

Parameters

NameTypeDefault value
dataImageSourceIntervalundefined
clearbooleantrue

Returns

void

Defined in

gl-core/src/source/image.ts:113


updateImage

updateImage(options, clear?): void

Parameters

NameTypeDefault value
optionsPick<ImageSourceOptions, "url" | "coordinates">undefined
clearbooleantrue

Returns

void

Defined in

gl-core/src/source/image.ts:118


setCoordinates

setCoordinates(coordinates): void

Parameters

NameType
coordinatesCoordinates

Returns

void

Defined in

gl-core/src/source/image.ts:126


asyncActor

asyncActor(tile, url): Promise<unknown>

Parameters

NameType
tileany
urlany

Returns

Promise<unknown>

Defined in

gl-core/src/source/image.ts:131


load

load(cb?): void

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

Parameters

NameType
cb?any

Returns

void

Defined in

gl-core/src/source/image.ts:157


loaded

loaded(): boolean

Returns

boolean

Defined in

gl-core/src/source/image.ts:165


reload

reload(clear): void

Parameters

NameType
clearany

Returns

void

Defined in

gl-core/src/source/image.ts:169


getTileUrl

getTileUrl(tileID): string[]

Parameters

NameType
tileIDany

Returns

string[]

Defined in

gl-core/src/source/image.ts:181


loadTile

loadTile(tile, callback): any

Parameters

NameType
tileTile
callbackany

Returns

any

Defined in

gl-core/src/source/image.ts:189


hasTile

hasTile(coord): boolean

Parameters

NameType
coordany

Returns

boolean

Defined in

gl-core/src/source/image.ts:237


getFadeTime

getFadeTime(): number

Returns

number

Defined in

gl-core/src/source/image.ts:241


abortTile

abortTile(tile, callback): void

Parameters

NameType
tileTile
callbackany

Returns

void

Defined in

gl-core/src/source/image.ts:245


unloadTile

unloadTile(tile, cb): void

Parameters

NameType
tileany
cbany

Returns

void

Defined in

gl-core/src/source/image.ts:275


destroy

destroy(): void

Returns

void

Defined in

gl-core/src/source/image.ts:277

Released under the MIT License.