Using Load-On-Demand > Structure and Size of the Tiling Grid > Structure of the Tiling Grid
 
Structure of the Tiling Grid
The tiling grid is defined by its origin tile, which is located at the intersection of the row and column of index 0.
The other tiles in the grid are identified by their column and row number, starting from the origin tile. The following code sample displays the status of the tile that is at the intersection of column col and row row:
 
void
SimpleLod::displayTileStatus(int row, int col)
{
IlvTile* tile = _tiledLayer->getTileController()->getTile(col, row);
if (!tile)
IlvPrint(“The tile %d %d is not yet loaded”,
col, row);
else {
IlvTileStatus status;
status = tile->getStatus();
switch(status) {
case IlvTileEmpty:
IlvPrint(“The tile %d %d is empty”, col, row);
break;
case IlvTileLocked:
IlvPrint(“The tile %d %d is locked”, col, row);
break;
case IlvTileCached:
IlvPrint(“The tile %d %d is cached”, col, row);
break;
case IlvTileDeleted:
IlvPrint(“The tile %d %d is deleted”, col, row);
break;
}
}
}
 
You can see in the above code sample that the getTile method can sometimes return a null value. Because the potential number of tiles can be very great (the number of tiles is even virtually infinite) the IlvTile objects are allocated only if the tile is loaded or is in the cache.

Version 5.5.1
Copyright © 2012, Rogue Wave Software, Inc. All Rights Reserved.