DiscardMissingTileImagePolicy - Cesium Documentation

# DiscardMissingTileImagePolicy

#### new DiscardMissingTileImagePolicy(options)

  A policy for discarding tile images that match a known image containing a "missing" image.

  Name | Type | Description
  --- | --- | ---

  `options`

  Object

  Object with the following properties:

  Name | Type | Default | Description
  --- | --- | --- | ---
  `missingImageUrl` | 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` | optional 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.

  Source: Scene/DiscardMissingTileImagePolicy.js, line 33

### Methods

#### isReady()

  Determines if the discard policy is ready to process images.

  ##### Returns:

  True if the discard policy is ready to process images; otherwise, false.
  Source: Scene/DiscardMissingTileImagePolicy.js, line 96

#### shouldDiscardImage(image)

  Given a tile image, decide whether to discard that image.

  Name | Type | Description
  --- | --- | ---
  `image` | Image | An image to test.

  ##### Returns:

  True if the image should be discarded; otherwise, false.

  ##### Throws:

  - DeveloperError : `shouldDiscardImage` must not be called before the discard policy is ready.
  Source: Scene/DiscardMissingTileImagePolicy.js, line 108