Class: ImageSource ¶
Hierarchy ¶
EventEmitter
↳
ImageSource
Table of contents ¶
Constructors ¶
Properties ¶
Accessors ¶
Methods ¶
- onAdd
- prepare
- update
- updateImage
- setCoordinates
- asyncActor
- load
- loaded
- reload
- getTileUrl
- loadTile
- hasTile
- getFadeTime
- abortTile
- unloadTile
- destroy
Constructors ¶
constructor ¶
• new ImageSource(id
, options
): ImageSource
Parameters ¶
Name | Type |
---|---|
id | any |
options | ImageSourceOptions |
Returns ¶
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 ¶
Name | Type |
---|---|
layer | any |
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:470
prepare ¶
▸ prepare(renderer
, dispatcher
, parseOptions
): void
Parameters ¶
Name | Type |
---|---|
renderer | Renderer |
dispatcher | any |
parseOptions | ParseOptionsType |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:471
update ¶
▸ update(data
, clear?
): void
Parameters ¶
Name | Type |
---|---|
data | ImageSourceInterval |
clear? | boolean |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:472
updateImage ¶
▸ updateImage(options
, clear?
): void
Parameters ¶
Name | Type |
---|---|
options | Pick <ImageSourceOptions , "url" | "coordinates" > |
clear? | boolean |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:473
setCoordinates ¶
▸ setCoordinates(coordinates
): void
Parameters ¶
Name | Type |
---|---|
coordinates | Coordinates |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:474
asyncActor ¶
▸ asyncActor(tile
, url
): Promise
<unknown
>
Parameters ¶
Name | Type |
---|---|
tile | any |
url | any |
Returns ¶
Promise
<unknown
>
Defined in ¶
gl-core/dist/index.d.ts:475
load ¶
▸ load(cb?
): void
兼容 TileJSON 加载,需要具体实现
Parameters ¶
Name | Type |
---|---|
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 ¶
Name | Type |
---|---|
clear | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:482
getTileUrl ¶
▸ getTileUrl(tileID
): string
[]
Parameters ¶
Name | Type |
---|---|
tileID | any |
Returns ¶
string
[]
Defined in ¶
gl-core/dist/index.d.ts:483
loadTile ¶
▸ loadTile(tile
, callback
): any
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
any
Defined in ¶
gl-core/dist/index.d.ts:484
hasTile ¶
▸ hasTile(coord
): boolean
Parameters ¶
Name | Type |
---|---|
coord | any |
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 ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/dist/index.d.ts:487
unloadTile ¶
▸ unloadTile(tile
, cb
): void
Parameters ¶
Name | Type |
---|---|
tile | any |
cb | any |
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