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/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 ¶
Name | Type |
---|---|
layer | any |
cb? | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:102
prepare ¶
▸ prepare(renderer
, dispatcher
, parseOptions
): void
Parameters ¶
Name | Type |
---|---|
renderer | Renderer |
dispatcher | any |
parseOptions | ParseOptionsType |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:107
update ¶
▸ update(data
, clear?
): void
Parameters ¶
Name | Type | Default value |
---|---|---|
data | ImageSourceInterval | undefined |
clear | boolean | true |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:113
updateImage ¶
▸ updateImage(options
, clear?
): void
Parameters ¶
Name | Type | Default value |
---|---|---|
options | Pick <ImageSourceOptions , "url" | "coordinates" > | undefined |
clear | boolean | true |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:118
setCoordinates ¶
▸ setCoordinates(coordinates
): void
Parameters ¶
Name | Type |
---|---|
coordinates | Coordinates |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:126
asyncActor ¶
▸ asyncActor(tile
, url
): Promise
<unknown
>
Parameters ¶
Name | Type |
---|---|
tile | any |
url | any |
Returns ¶
Promise
<unknown
>
Defined in ¶
gl-core/src/source/image.ts:131
load ¶
▸ load(cb?
): void
兼容 TileJSON 加载,需要具体实现
Parameters ¶
Name | Type |
---|---|
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 ¶
Name | Type |
---|---|
clear | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:169
getTileUrl ¶
▸ getTileUrl(tileID
): string
[]
Parameters ¶
Name | Type |
---|---|
tileID | any |
Returns ¶
string
[]
Defined in ¶
gl-core/src/source/image.ts:181
loadTile ¶
▸ loadTile(tile
, callback
): any
Parameters ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
any
Defined in ¶
gl-core/src/source/image.ts:189
hasTile ¶
▸ hasTile(coord
): boolean
Parameters ¶
Name | Type |
---|---|
coord | any |
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 ¶
Name | Type |
---|---|
tile | Tile |
callback | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:245
unloadTile ¶
▸ unloadTile(tile
, cb
): void
Parameters ¶
Name | Type |
---|---|
tile | any |
cb | any |
Returns ¶
void
Defined in ¶
gl-core/src/source/image.ts:275
destroy ¶
▸ destroy(): void
Returns ¶
void