Class: DiscardMissingTileImagePolicy

DiscardMissingTileImagePolicy

new DiscardMissingTileImagePolicy()

The strategy for discarding tile images that match known 'missing' images.

Name Type Default Description
options.missingImageUrl String

The URL of the missing image is known.

options.pixelsToCheck Array.<Cartesian2>

Cartesian pixel position array for comparison with missing images.

options.disableCheckIfAllPixelsAreTransparent Boolean false optional

If it is' true ', then if the alpha value of all pixelsToCheck in missingImageURL is 0, discard check will be disabled. If it is' false ', discard check will be performed regardless of the value of pixelsToCheck.

Methods

isReady(){Boolean}

Determine if the discard strategy is ready to process the image.

Returns:
Type Description
Boolean If the discard strategy is ready to process the image, it is true; Otherwise, it is false.

shouldDiscardImage(image){Boolean}

Given a tile image, decide whether to discard it.

Name Type Description
image Image

Testing images.

Throws:

ShouldDiscardImage must not be called before the discard policy is ready.

Type
DeveloperError
Returns:
Type Description
Boolean If the image should be discarded, it is true; Otherwise, it is false.