Class: TileID ¶
Table of contents ¶
Constructors ¶
Properties ¶
Methods ¶
Constructors ¶
constructor ¶
• new TileID(overscaledZ
, wrap
, z
, x
, y
, options?
): TileID
Parameters ¶
Name | Type | Description |
---|---|---|
overscaledZ | number | 扩大的 z 值 |
wrap | undefined | number | 所处世界 |
z | number | 层级 |
x | number | 列 |
y | number | 行 |
options? | TileIDOptions | 瓦片其他配置 |
Returns ¶
Defined in ¶
gl-core/dist/index.d.ts:261
Properties ¶
x ¶
• x: number
瓦片列
Defined in ¶
gl-core/dist/index.d.ts:207
wrapedX ¶
• wrapedX: number
跨世界后的瓦片列
Defined in ¶
gl-core/dist/index.d.ts:211
y ¶
• y: number
瓦片行
Defined in ¶
gl-core/dist/index.d.ts:215
wrapedY ¶
• wrapedY: number
跨世界后的瓦片行(目前仅 maptalks 支持)
Defined in ¶
gl-core/dist/index.d.ts:219
z ¶
• z: number
瓦片层级
Defined in ¶
gl-core/dist/index.d.ts:223
wrap ¶
• wrap: number
所在世界(如果是多世界的话)
Defined in ¶
gl-core/dist/index.d.ts:227
overscaledZ ¶
• overscaledZ: number
放大后的 zoom 值
Defined in ¶
gl-core/dist/index.d.ts:231
tileKey ¶
• tileKey: string
瓦片唯一标识
Defined in ¶
gl-core/dist/index.d.ts:235
unWrappedTileKey ¶
• unWrappedTileKey: string
不包含跨世界的瓦片标识(因为多个世界的瓦片如果仅仅是 wrap
不同,他们对应的数据资源是完全相同的)
Defined in ¶
gl-core/dist/index.d.ts:239
tileBounds ¶
• tileBounds: Bounds
瓦片范围(每次获取时计算)
Defined in ¶
gl-core/dist/index.d.ts:243
projTileBounds ¶
• projTileBounds: ProjTileBounds
投影后的瓦片范围
Defined in ¶
gl-core/dist/index.d.ts:247
options ¶
• options: TileIDOptions
Defined in ¶
gl-core/dist/index.d.ts:248
dep ¶
• dep: any
挂载的其他数据
Defined in ¶
gl-core/dist/index.d.ts:252
Methods ¶
getTileBounds ¶
▸ getTileBounds(tileID?
): Bounds
获取瓦片范围
Parameters ¶
Name | Type |
---|---|
tileID? | this |
Returns ¶
Bounds
Defined in ¶
gl-core/dist/index.d.ts:265
getTileProjBounds ¶
▸ getTileProjBounds(tileID?
, force?
): ProjTileBounds
获取瓦片投影后的范围
Parameters ¶
Name | Type |
---|---|
tileID? | this |
force? | boolean |
Returns ¶
ProjTileBounds
Defined in ¶
gl-core/dist/index.d.ts:269
overscaleFactor ¶
▸ overscaleFactor(): number
Returns ¶
number
Defined in ¶
gl-core/dist/index.d.ts:270
scaledTo ¶
▸ scaledTo(targetZ
): TileID
缩放到目标层级
Parameters ¶
Name | Type |
---|---|
targetZ | number |
Returns ¶
Defined in ¶
gl-core/dist/index.d.ts:275
parent ¶
▸ parent(): TileID
获取父级瓦片
Returns ¶
Defined in ¶
gl-core/dist/index.d.ts:279
children ¶
▸ children(sourceMaxZoom
): TileID
[]
查找当前瓦片的子瓦片
Parameters ¶
Name | Type |
---|---|
sourceMaxZoom | number |
Returns ¶
TileID
[]
Defined in ¶
gl-core/dist/index.d.ts:284
siblings ¶
▸ siblings(): TileID
[]
查找兄弟瓦片
Returns ¶
TileID
[]
Defined in ¶
gl-core/dist/index.d.ts:288
neighbor ¶
▸ neighbor(hor
, ver?
): TileID
查找相临瓦片
Parameters ¶
Name | Type | Description |
---|---|---|
hor | number | 横向偏移 |
ver? | number | 纵向偏移 |
Returns ¶
Defined in ¶
gl-core/dist/index.d.ts:294
isEqual ¶
▸ isEqual(tile
): boolean
判断瓦片是否相同 一般我们认为只要 xyz 和所处世界 wrap 相同就确认相同(即 tileKey 相同)
Parameters ¶
Name | Type |
---|---|
tile | TileID |
Returns ¶
boolean
Defined in ¶
gl-core/dist/index.d.ts:300
isRoot ¶
▸ isRoot(): boolean
判断是否是根节点
Returns ¶
boolean
Defined in ¶
gl-core/dist/index.d.ts:305