TileDiscardPolicy.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*global define*/
  2. define([
  3. '../Core/DeveloperError'
  4. ], function(
  5. DeveloperError) {
  6. "use strict";
  7. /**
  8. * A policy for discarding tile images according to some criteria. This type describes an
  9. * interface and is not intended to be instantiated directly.
  10. *
  11. * @alias TileDiscardPolicy
  12. * @constructor
  13. *
  14. * @see DiscardMissingTileImagePolicy
  15. * @see NeverTileDiscardPolicy
  16. */
  17. var TileDiscardPolicy = function(options) {
  18. DeveloperError.throwInstantiationError();
  19. };
  20. /**
  21. * Determines if the discard policy is ready to process images.
  22. * @function
  23. *
  24. * @returns {Boolean} True if the discard policy is ready to process images; otherwise, false.
  25. */
  26. TileDiscardPolicy.prototype.isReady = DeveloperError.throwInstantiationError;
  27. /**
  28. * Given a tile image, decide whether to discard that image.
  29. * @function
  30. *
  31. * @param {Image|Promise} image An image, or a promise that will resolve to an image.
  32. * @returns {Boolean} A promise that will resolve to true if the tile should be discarded.
  33. */
  34. TileDiscardPolicy.prototype.shouldDiscardImage = DeveloperError.throwInstantiationError;
  35. return TileDiscardPolicy;
  36. });