Interface ILcdEarthTileSetCallback


public interface ILcdEarthTileSetCallback
A callback interface used by ILcdEarthTileSet. This callback is used to return requested tiles to the user of the tileset. It may also be used to signal that a requested tile was not available.
Since:
8.2
  • Method Details

    • tileAvailable

      void tileAvailable(ALcdEarthTile aEarthTile, Object aContext)
      Called when the requested tile is ready to be used.

      If different requests for the same tile are received, the tileset may return the same ALcdEarthTile instance to each of the supplied callbacks. Applications should therefore never modify the tile that they receive, as these changes might adversely affect other consumers of the same tileset.

      Note that if the tile set supports some form of incremental update mechanism, it may invoke this method more than once, with each invocation adding more data to the tile. For all but the last invocation, ALcdEarthTile.isComplete() will return false, so that the application knows when a tile is still being updated. In the case of incremental updates, the tileset is advised not to reuse the same ALcdEarthTile instance for each invocation of the callback, as doing so might lead to synchronization issues because the tile is being modified while it is already in use somewhere.

      Parameters:
      aEarthTile - the tile that was produced
      aContext - the context with which the tile was requested
    • tileNotAvailable

      void tileNotAvailable(int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Object aContext, String aReason, Exception aException)
      Called when a tile that was requested earlier cannot be created by the tileset. This might be because it effectively does not exist, because the requested geo reference is not supported, or any other reason. The aReason and aException parameters indicate why the tile is not available. These parameters may also be null (ex. if the tile does not exist). The aException parameter should be set if the tile is not available due to an error to allow proper handling by the tile consumer.

      If the tileset changes dynamically then the same tile might still become available anyway at some time in the future, but otherwise the application need not request this tile again.

      Parameters:
      aLevel - the detail level at which the tile was requested
      aTileX - the column index of the tile that was requested
      aTileY - the row index of the tile that was requested
      aCoverage - the coverage on which the tile was requested
      aGeoReference - the geo reference in which the tile was requested
      aFormat - the format in which the tile was requested
      aContext - the context parameter with which the tile was requested; this may also contain extra information about the reason
      aReason - an explanation as to why the tile is not available or null
      aException - the error that caused the tile to be unavailable or null