Rogue Wave Views Maps Package API Reference Guide |
Rogue Wave Views Documentation Home |
A tiled layer is an IlvManagerLayer
object for loading large sets of data, for example, large maps.
More...
#include <ilviews/maps/tiling/tiledlayer.h>
Public Member Functions | |
IlvTiledLayer (const IlvRect &tileOrigin, IlvTileCache *cache=0, IlBoolean startEnabled=IlTrue, IlUShort maxInList=IlvMaxObjectsInList, IlUShort maxInNode=IlvMaxObjectsInList) | |
Creates an instance of tiled layer. More... | |
virtual void | draw (IlvPort *port, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) const |
Draws the content of the layer. More... | |
void | fitTransformerToTile (IlvView *view, IlInt row, IlInt column) const |
Sets the transformer of view so that the specified tile is fully visible. More... | |
IlvView * | getDebugView () const |
Returns the debug view of the layer if it has been specified. More... | |
virtual IlvMapsError | getInitStatus () const |
Returns the initialization status of this tiled layer. More... | |
const IlvRect & | getSize () const |
Returns the size of the layer if it has been specified. More... | |
IlvTileController * | getTileController () const |
Returns the tile controller of the layer. More... | |
IlvTileLoader * | getTileLoader () const |
Returns the tile loader of the layer. More... | |
IlBoolean | isDebugDrawingOnTop () |
Specifies whether the debug graphics are to be drawn above or under the graphics. More... | |
void | setDebugDrawingOnTop (IlBoolean set) |
Tells the debug view if it should draw the drawing on the top. More... | |
void | setDebugView (IlvView *view, IlvColor *borderColor=0, IlvColor *lockedTilesColor=0, IlvColor *cachedTilesColor=0) |
Sets a debug view in which the layer will draw its tiles. More... | |
void | setSize (const IlvRect &rect) |
Specifies the area in which the tiles are contained. More... | |
void | setTileLoader (IlvTileLoader *tileLoader) |
Sets the tile loader of the layer. More... | |
void | start () |
Starts the load-on-demand process. | |
Static Public Member Functions | |
static IlvTiledLayer * | GetFirstTiledLayer (IlvManager *manager) |
Returns the first IlvTiledLayer of the manager or a null pointer if the manager does not contain any IlvTiledLayer . More... | |
static void | StartAll (IlvManager *manager) |
Starts all the tiled layers of the specified manager. More... | |
Protected Member Functions | |
virtual void | setInitStatus (IlvMapsError status) |
Sets the initialization status of this layer. More... | |
A tiled layer is an IlvManagerLayer
object for loading large sets of data, for example, large maps.
Library: ilvmaps
It is divided into a number of identical rectangular areas called tiles, and provides a notification mechanism to load only the graphic objects that are required by the application, because a tile is visible in one of the views of the manager or because it has been explicitly required by the application. The tiles are managed by an IlvTileController
.
This image shows an IlvTiledLayer
in debug mode.
An IlvTiledLayer
is associated to three important objects:
IlvTileController
, which manages the tile events. IlvTileLoader
, which loads the tiles from a data source. IlvTileCache
, which manages the cache and deletes the unused tiles. When an IlvTiledLayer
is saved into an .ilv
file, it does not save the graphic objects it contains. It saves its tiling parameters (loader, cache, tile controller).
IlvTiledLayer::IlvTiledLayer | ( | const IlvRect & | tileOrigin, |
IlvTileCache * | cache = 0 , |
||
IlBoolean | startEnabled = IlTrue , |
||
IlUShort | maxInList = IlvMaxObjectsInList , |
||
IlUShort | maxInNode = IlvMaxObjectsInList |
||
) |
Creates an instance of tiled layer.
tileOrigin | The position of the tile of row 0 and column 0. |
cache | The cache that will monitor the release operations of the cached tiles. If this optional parameter is absent or if it has a null value, the default cache will be used. |
startEnabled | Specifies if the load-on-demand process is ready to start. |
maxInList | Specifies the number of object that will trigger a quadtree division. A large number will deactivate the spatial indexation. |
maxInNode | Specifies the maximum number of quadtree subdivisions. |
|
virtual |
Draws the content of the layer.
port | The port in which the layer content will be drawn. |
t | The transformer. If set to null, the layer is drawn using the manager coordinate system. |
region | The region to be drawn. |
clip | The clip. |
Sets the transformer of view
so that the specified tile is fully visible.
This function should not be called if the layer has not been added to an IlvManager
. In this case, the function does nothing.
view | The view. |
row | The row of the tile. |
column | The column of the tile. |
IlvView* IlvTiledLayer::getDebugView | ( | ) | const |
Returns the debug view of the layer if it has been specified.
IlvView
.
|
static |
Returns the first IlvTiledLayer
of the manager or a null pointer if the manager does not contain any IlvTiledLayer
.
manager | The IlvManager . |
IlvTiledLayer
of this manager.
|
virtual |
Returns the initialization status of this tiled layer.
IlvMaps::NoError()
if this tiled layer has been initialized successfully, an error otherwise. Reimplemented in IlvSDOLayer.
const IlvRect& IlvTiledLayer::getSize | ( | ) | const |
Returns the size of the layer if it has been specified.
This method is a shortcut for getTileController->getSize()
IlvRect
object containing the size of the layer. IlvTileController* IlvTiledLayer::getTileController | ( | ) | const |
Returns the tile controller of the layer.
IlvTileControler
object of the layer. IlvTileLoader* IlvTiledLayer::getTileLoader | ( | ) | const |
Returns the tile loader of the layer.
This method is a shortcut for getTileController->getTileLoader()
.
IlvTileLoader
of this layer. IlBoolean IlvTiledLayer::isDebugDrawingOnTop | ( | ) |
Specifies whether the debug graphics are to be drawn above or under the graphics.
IlTrue
if the graphics are drawn on top of the graphics, IlFalse
otherwise. void IlvTiledLayer::setDebugDrawingOnTop | ( | IlBoolean | set | ) |
Tells the debug view if it should draw the drawing on the top.
set | If IlTrue , the debug graphics are drawn on top of the objects. If IlFalse , the debug graphics are drawn under the graphics. |
void IlvTiledLayer::setDebugView | ( | IlvView * | view, |
IlvColor * | borderColor = 0 , |
||
IlvColor * | lockedTilesColor = 0 , |
||
IlvColor * | cachedTilesColor = 0 |
||
) |
Sets a debug view in which the layer will draw its tiles.
view | The debug view (it must be attached to the manager of the layer). If this argument is null , then no debug view is used by the layer and the previous debug view is considered as a normal view. |
borderColor | The color used to draw the tile border. If the optional parameter is not specified, the borders are drawn in green. |
lockedTilesColor | The color used to draw the locked tiles. If the optional parameter is not specified, the borders are drawn in blue. |
cachedTilesColor | The color used to draw the cached tiles. If the optional parameter is not specified, the borders are drawn in yellow. |
|
protectedvirtual |
Sets the initialization status of this layer.
Subclasses of IlvTiledLayer
should call this method when their initialization is not successful.
status | The initialization status. |
void IlvTiledLayer::setSize | ( | const IlvRect & | rect | ) |
Specifies the area in which the tiles are contained.
If the rect
parameter has a width and height of 0
there is no limit to the tiling grid. This method is a shortcut for getTileController->setSize()
.
rect | The area in which the tiles are contained. |
void IlvTiledLayer::setTileLoader | ( | IlvTileLoader * | tileLoader | ) |
Sets the tile loader of the layer.
This method is a shortcut for getTileController->setTileLoader()
.
tileLoader | The new IlvTilLoader for this layer. |
|
static |
Starts all the tiled layers of the specified manager.
manager | The IlvManager . |
© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.