类名 MapGISTileAvailability

# new MapGISTileAvailability(layers)

MapGIS的TileAvailability类,重写了Cesium.TileAvailability的所有方法,支持在内部自动筛选要使用的地形图层

参数:

名称 类型 描述
layers Array.<Object>

地形图层数组

方法

# addAvailableTileRange(level, startX, startY, endX, endY)

Marks a rectangular range of tiles in a particular level as being available. For best performance, add your ranges in order of increasing level.

参数:

名称 类型 描述
level Number

The level.

startX Number

The X coordinate of the first available tiles at the level.

startY Number

The Y coordinate of the first available tiles at the level.

endX Number

The X coordinate of the last available tiles at the level.

endY Number

The Y coordinate of the last available tiles at the level.

# computeBestAvailableLevelOverRectangle(rectangle)

Finds the most detailed level that is available everywhere within a given rectangle. More detailed tiles may be available in parts of the rectangle, but not the whole thing. The return value of this function may be safely passed to Cesium.sampleTerrain for any position within the rectangle. This function usually completes in time logarithmic to the number of rectangles added with Cesium.MapGISTileAvailability.addAvailableTileRange()

参数:

名称 类型 描述
rectangle Cesium.Rectangle

The rectangle.

The best available level for the entire rectangle.

Number

# computeChildMaskForTile(level, x, y)

Computes a bit mask indicating which of a tile's four children exist. If a child's bit is set, a tile is available for that child. If it is cleared, the tile is not available. The bit values are as follows:

Bit PositionBit ValueChild Tile
01Southwest
12Southeast
24Northwest
38Northeast

参数:

名称 类型 描述
level Number

The level of the parent tile.

x Number

The X coordinate of the parent tile.

y Number

The Y coordinate of the parent tile.

The bit mask indicating child availability.

Number

# computeMaximumLevelAtPosition(position)

Determines the level of the most detailed tile covering the position. This function usually completes in time logarithmic to the number of rectangles added with Cesium.MapGISTileAvailability.addAvailableTileRange()

参数:

名称 类型 描述
position Cesium.Cartographic

The position for which to determine the maximum available level. The height component is ignored.

If position is outside any tile according to the tiling scheme.

Cesium.DeveloperError

The level of the most detailed tile covering the position.

Number

# isTileAvailable(level, x, y)

Determines if a particular tile is available.

参数:

名称 类型 描述
level Number

The tile level to check.

x Number

The X coordinate of the tile to check.

y Number

The Y coordinate of the tile to check.

True if the tile is available; otherwise, false.

Boolean
构造函数
成员变量
方法
事件