TileDiscardPolicy.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. import DeveloperError from "../Core/DeveloperError.js";
  2. /**
  3. * A policy for discarding tile images according to some criteria. This type describes an
  4. * interface and is not intended to be instantiated directly.
  5. *
  6. * @alias TileDiscardPolicy
  7. * @constructor
  8. *
  9. * @see DiscardMissingTileImagePolicy
  10. * @see NeverTileDiscardPolicy
  11. */
  12. function TileDiscardPolicy(options) {
  13. DeveloperError.throwInstantiationError();
  14. }
  15. /**
  16. * Determines if the discard policy is ready to process images.
  17. * @function
  18. *
  19. * @returns {boolean} True if the discard policy is ready to process images; otherwise, false.
  20. */
  21. TileDiscardPolicy.prototype.isReady = DeveloperError.throwInstantiationError;
  22. /**
  23. * Given a tile image, decide whether to discard that image.
  24. * @function
  25. *
  26. * @param {HTMLImageElement} image An image to test.
  27. * @returns {boolean} True if the image should be discarded; otherwise, false.
  28. */
  29. TileDiscardPolicy.prototype.shouldDiscardImage =
  30. DeveloperError.throwInstantiationError;
  31. export default TileDiscardPolicy;