English中文

TileAvailability

new Cesium.TileAvailability(tilingScheme, maximumLevel)

报告瓷砖的可用性 Reports the availability of tiles in a TilingScheme.
名称 Name 类型 Type 说明 Description
tilingScheme TilingScheme 报告可用性的切片方案。 The tiling scheme in which to report availability.
maximumLevel number 可能可用的最大图块级别。 The maximum tile level that is potentially available.

方法 Methods

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.
名称 Name 类型 Type 说明 Description
level number 水平。 The level.
startX number 该关卡中第一个可用图块的 X 坐标。 The X coordinate of the first available tiles at the level.
startY number 该关卡中第一个可用图块的 Y 坐标。 The Y coordinate of the first available tiles at the level.
endX number 该关卡中最后一个可用图块的 X 坐标。 The X coordinate of the last available tiles at the level.
endY number 该关卡中最后一个可用图块的 Y 坐标。 The Y coordinate of the last available tiles at the level.

computeBestAvailableLevelOverRectangle(rectangle)number

查找给定矩形内_所有地方_可用的最详细级别。更详细的图块可能在矩形的某些部分可用,但不是整个矩形。该函数的返回值可以安全地传递给 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 sampleTerrain 对于矩形内的任意位置。该函数通常在与添加的矩形数量成对数的时间内完成 for any position within the rectangle. This function usually completes in time logarithmic to the number of rectangles added with TileAvailability#addAvailableTileRange.
名称 Name 类型 Type 说明 Description
rectangle Rectangle 矩形。 The rectangle.
返回: Returns:
整个矩形的最佳可用级别。 The best available level for the entire rectangle.

computeChildMaskForTile(level, x, y)number

计算一个位掩码,指示存在图块的四个子级中的哪一个。如果设置了孩子的位,则该孩子可以使用图块。如果清除,则该图块不可用。位值如下: 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 Position位值 Bit Value儿童瓷砖 Child Tile
01Southwest
12Southeast
24Northwest
38Northeast
名称 Name 类型 Type 说明 Description
level number 父图块的级别。 The level of the parent tile.
x number 父图块的 X 坐标。 The X coordinate of the parent tile.
y number 父图块的 Y 坐标。 The Y coordinate of the parent tile.
返回: Returns:
指示子项可用性的位掩码。 The bit mask indicating child availability.

computeMaximumLevelAtPosition(position)number

确定覆盖该位置的最详细图块的级别。该函数通常在与添加的矩形数量成对数的时间内完成 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 TileAvailability#addAvailableTileRange.
名称 Name 类型 Type 说明 Description
position Cartographic 确定最大可用级别的位置。高度分量被忽略。 The position for which to determine the maximum available level. The height component is ignored.
返回: Returns:
覆盖该位置的最详细图块的级别。 The level of the most detailed tile covering the position.
抛出: Throws:
  • DeveloperError :根据切片方案,如果位置位于任何切片之外。 : If position is outside any tile according to the tiling scheme.

isTileAvailable(level, x, y)boolean

确定特定图块是否可用。 Determines if a particular tile is available.
名称 Name 类型 Type 说明 Description
level number 要检查的瓷砖水平。 The tile level to check.
x number 要检查的图块的 X 坐标。 The X coordinate of the tile to check.
y number 要检查的图块的 Y 坐标。 The Y coordinate of the tile to check.
返回: Returns:
如果图块可用则为 True;否则为假。 True if the tile is available; otherwise, false.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.