This abstract class is used to load a tile for an IlvTileController
or an IlvTiledLayer
.
More...
#include <ilviews/maps/tiling/tileloader.h>
Public Member Functions | |
virtual void | controllerDeleted (IlvTileController *controller) |
Called when the controller is deleted. More... | |
virtual IlBoolean | isPersistent () const =0 |
Checks if the object must be saved by a tile controller. More... | |
virtual IlvMapsError | load (IlvTile *tile)=0 |
Called when a tile has to be loaded. More... | |
virtual void | release (IlvTile *tile)=0 |
Called when a tile has to be released. More... | |
virtual void | tileDeleted (IlvTile *tile) |
Called when a tile is deleted during the controller destruction. More... | |
This abstract class is used to load a tile for an IlvTileController
or an IlvTiledLayer
.
Library: ilvmaps
The following example shows a tile loader that fills a tile with a generated list of graphic objects.
class MyTileLoader : public IlvTileLoader { public: MyTileLoader();
IlvMapsError load(IlvTile* tile) { IlvRect bbox; tile->boundingBox(bbox); IlvPoint p(bbox.x(), bbox.y()); for (IlInt i = 0; i < bbox.w(); i += 10) { for (IlInt j = 0; j < bbox.h(); j += 10) { IlvMarker* m = new IlvMarker(tile->getDisplay(), p); tile->addObject(m); p.translate(0, 10); } p.move(bbox.x() + i, bbox.y()); } tile->loadComplete(); return IlvMaps::NoError(); }
virtual void release(IlvTile* tile) { tile->deleteAll(); }
virtual void controllerDeleted(IlvTileController* controller) { delete this; }
virtual IlBoolean isPersistent() const { return IlFalse; }
};
|
virtual |
Called when the controller is deleted.
controller | The tile controller that is being deleted. |
|
pure virtual |
Checks if the object must be saved by a tile controller.
IlTrue
if the object must be saved, IlFalse
otherwise. Implemented in IlvMapTileLoader, IlvShapeFileTileLoader, IlvSDOTileLoader, IlvImageTileLoader, and IlvGeoTIFFTileLoader.
|
pure virtual |
Called when a tile has to be loaded.
When the tile loader has finished its operation, it should call the function IlvTile::loadComplete
to notify the tile listeners.
tile | The tile to be loaded. |
Implemented in IlvDefaultSDOTileLoader, IlvSDOTileLoader, IlvDefaultObjectSDOTileLoader, and IlvMapTileLoader.
|
pure virtual |
Called when a tile has to be released.
tile | The tile to be released. |
Implemented in IlvSDOTileLoader, and IlvMapTileLoader.
|
virtual |
Called when a tile is deleted during the controller destruction.
tile | The tile that is deleted by a tile controller. |