DiscardMissingTileImagePolicy

new Cesium.DiscardMissingTileImagePolicy(options)

A policy for discarding tile images that match a known image containing a "missing" image.
参数名称 类型 描述信息
options object Object with the following properties:
参数名称 类型 默认值 描述信息
missingImageUrl Resource | string The URL of the known missing image.
pixelsToCheck Array.<Cartesian2> An array of Cartesian2 pixel positions to compare against the missing image.
disableCheckIfAllPixelsAreTransparent boolean false 可选 If true, the discard check will be disabled if all of the pixelsToCheck in the missingImageUrl have an alpha value of 0. If false, the discard check will proceed no matter the values of the pixelsToCheck.

方法

Determines if the discard policy is ready to process images.
返回值:
True if the discard policy is ready to process images; otherwise, false.

shouldDiscardImage(image)boolean

Given a tile image, decide whether to discard that image.
参数名称 类型 描述信息
image HTMLImageElement An image to test.
返回值:
True if the image should be discarded; otherwise, false.
Throws:
  • DeveloperError : shouldDiscardImage must not be called before the discard policy is ready.