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