DiscardMissingTileImagePolicy

new Cesium.DiscardMissingTileImagePolicy(options)

用于丢弃与已知图像匹配的切片图像的策略,该图像包含 “缺失”图像。
Name Type Description
options object 对象,具有以下属性:
Name Type Default Description
missingImageUrl Resource | string 已知缺失图像的 URL。
pixelsToCheck Array.<Cartesian2> 一个 Cartesian2 像素位置的数组,以 与缺失的图像进行比较。
disableCheckIfAllPixelsAreTransparent boolean false optional 如果为 true,则丢弃检查将被禁用 如果 missingImageUrl 中的所有 pixelsToCheck 的 alpha 值为 0。 如果为 false,则 无论 pixelsToCheck 的值是多少,放弃检查都会继续进行。

Methods

确定丢弃策略是否已准备好处理映像。
Returns:
如果丢弃策略已准备好处理图像,则为 True;否则为 false。

shouldDiscardImage(image)boolean

给定一个平铺图像,决定是否丢弃该图像。
Name Type Description
image HTMLImageElement 要测试的图像。
Returns:
如果应该丢弃图像,则为 True;否则为 false。
Throws:
  • DeveloperError : 在丢弃策略准备就绪之前,不得调用 shouldDiscardImage
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.