public interface ILcdEarthTileSetCallback
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.Modifier and Type | Method and Description |
---|---|
void |
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.
|
void tileAvailable(ALcdEarthTile aEarthTile, Object aContext)
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.aEarthTile
- the tile that was producedaContext
- the context with which the tile was requestedvoid tileNotAvailable(int aLevel, long aTileX, long aTileY, ILcdEarthTileSetCoverage aCoverage, ILcdGeoReference aGeoReference, TLcdEarthTileFormat aFormat, Object aContext, String aReason, Exception aException)
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.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 or null
aException
- the error that caused the tile to be unavailable or null