Package com.luciad.earth.tileset
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 Summary
Modifier and TypeMethodDescriptionvoid
tileAvailable
(ALcdEarthTile aEarthTile, Object aContext) Called when the requested tile is ready to be used.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.
-
Method Details
-
tileAvailable
Called when the requested tile is ready to be used. If different requests for the same tile are received, the tileset may return the sameALcdEarthTile
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 sameALcdEarthTile
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 producedaContext
- 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. TheaReason
andaException
parameters indicate why the tile is not available. These parameters may also benull
(ex. if the tile does not exist). TheaException
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 requestedaTileX
- the column index of the tile that was requestedaTileY
- the row index of the tile that was requestedaCoverage
- the coverage on which the tile was requestedaGeoReference
- the geo reference in which the tile was requestedaFormat
- the format in which the tile was requestedaContext
- the context parameter with which the tile was requested; this may also contain extra information about the reasonaReason
- an explanation as to why the tile is not available ornull
aException
- the error that caused the tile to be unavailable ornull
-