Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvTiledLayer Class Reference

A tiled layer is an IlvManagerLayer object for loading large sets of data, for example, large maps. More...

#include <ilviews/maps/tiling/tiledlayer.h>

Inheritance diagram for IlvTiledLayer:
IlvManagerLayer IlvIndexedSet IlvCADRGLayer IlvDTEDLayer IlvGeoTIFFLayer IlvImageLayer IlvSDOLayer IlvShapeFileLayer IlvObjectSDOLayer

Public Member Functions

 IlvTiledLayer (const IlvRect &tileOrigin, IlvTileCache *cache=0, IlBoolean startEnabled=IlTrue, IlUShort maxInList=IlvMaxObjectsInList, IlUShort maxInNode=IlvMaxObjectsInList)
 Initializes a new tiled layer instance. 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 a view so that the specified tile is fully visible. More...
 
IlvViewgetDebugView () 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 IlvRectgetSize () const
 Returns the size of the layer if it has been specified. More...
 
IlvTileControllergetTileController () const
 Returns the tile controller of the layer. More...
 
IlvTileLoadergetTileLoader () const
 Returns the tile loader of the layer. More...
 
IlBoolean isDebugDrawingOnTop () const
 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 IlvTiledLayerGetFirstTiledLayer (IlvManager *manager)
 Returns the first IlvTiledLayer of the manager. 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...
 

Detailed Description

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:

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).

Constructor & Destructor Documentation

◆ IlvTiledLayer()

IlvTiledLayer::IlvTiledLayer ( const IlvRect tileOrigin,
IlvTileCache cache = 0,
IlBoolean  startEnabled = IlTrue,
IlUShort  maxInList = IlvMaxObjectsInList,
IlUShort  maxInNode = IlvMaxObjectsInList 
)

Initializes a new tiled layer instance.

Parameters
tileOriginThe position of the tile of row 0 and column 0.
cacheThe 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.
startEnabledSpecifies if the load-on-demand process is ready to start.
maxInListSpecifies the number of object that will trigger a quadtree division. A large number will deactivate the spatial indexation.
maxInNodeSpecifies the maximum number of quadtree subdivisions.
See also
IlvDefaultTileCache::GetDefaultCache().
IlvTileController::enableStart().

Member Function Documentation

◆ draw()

virtual void IlvTiledLayer::draw ( IlvPort port,
const IlvTransformer t = 0,
const IlvRegion region = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the content of the layer.

Parameters
portThe port in which the layer content will be drawn.
tThe transformer. If set to null, the layer is drawn using the manager coordinate system.
regionThe region to be drawn.
clipThe clip.

◆ fitTransformerToTile()

void IlvTiledLayer::fitTransformerToTile ( IlvView view,
IlInt  row,
IlInt  column 
) const

Sets the transformer of a view so that the specified tile is fully visible.

This function should not be called if the layer has not been added to anIlvManager. In this case, the function does nothing.

Parameters
viewThe view.
rowThe row of the tile.
columnThe column of the tile.

◆ getDebugView()

IlvView* IlvTiledLayer::getDebugView ( ) const

Returns the debug view of the layer if it has been specified.

Returns
The debug IlvView.

◆ GetFirstTiledLayer()

static IlvTiledLayer* IlvTiledLayer::GetFirstTiledLayer ( IlvManager manager)
static

Returns the first IlvTiledLayer of the manager.

Parameters
managerThe IlvManager.
Returns
The first IlvTiledLayer of this manager or 0 if the manager does not contain any IlvTiledLayer.

◆ getInitStatus()

virtual IlvMapsError IlvTiledLayer::getInitStatus ( ) const
virtual

Returns the initialization status of this tiled layer.

Returns
IlvMaps::NoError() if this tiled layer has been initialized successfully, an error otherwise.

Reimplemented in IlvSDOLayer.

◆ getSize()

const IlvRect& IlvTiledLayer::getSize ( ) const

Returns the size of the layer if it has been specified.

This method is a shortcut for getTileController->getSize()

Returns
An IlvRect object containing the size of the layer.
See also
IlvTiledLayer::setSize().

◆ getTileController()

IlvTileController* IlvTiledLayer::getTileController ( ) const

Returns the tile controller of the layer.

Returns
The IlvTileControler object of the layer.

◆ getTileLoader()

IlvTileLoader* IlvTiledLayer::getTileLoader ( ) const

Returns the tile loader of the layer.

This method is a shortcut for getTileController->getTileLoader().

Returns
The IlvTileLoader of this layer.

◆ isDebugDrawingOnTop()

IlBoolean IlvTiledLayer::isDebugDrawingOnTop ( ) const

Specifies whether the debug graphics are to be drawn above or under the graphics.

Returns
IlTrue if the graphics are drawn on top of the graphics, IlFalse otherwise.

◆ setDebugDrawingOnTop()

void IlvTiledLayer::setDebugDrawingOnTop ( IlBoolean  set)

Tells the debug view if it should draw the drawing on the top.

Parameters
setIf IlTrue, the debug graphics are drawn on top of the objects. If IlFalse, the debug graphics are drawn under the graphics.

◆ setDebugView()

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.

Parameters
viewThe debug view (it must be attached to the manager of the layer). If this argument is 0, then no debug view is used by the layer and the previous debug view is considered as a normal view.
borderColorThe color used to draw the tile border. If the optional parameter is not specified, the borders are drawn in green.
lockedTilesColorThe color used to draw the locked tiles. If the optional parameter is not specified, the borders are drawn in blue.
cachedTilesColorThe color used to draw the cached tiles. If the optional parameter is not specified, the borders are drawn in yellow.

◆ setInitStatus()

virtual void IlvTiledLayer::setInitStatus ( IlvMapsError  status)
protectedvirtual

Sets the initialization status of this layer.

Subclasses of IlvTiledLayer should call this method when their initialization is not successful.

Parameters
statusThe initialization status.

◆ setSize()

void IlvTiledLayer::setSize ( const IlvRect rect)

Specifies the area in which the tiles are contained.

This method is a shortcut for getTileController->setSize().

If rect parameter has a width and height of 0 there is no limit to the tiling grid.

Parameters
rectThe area in which the tiles are contained.

◆ setTileLoader()

void IlvTiledLayer::setTileLoader ( IlvTileLoader tileLoader)

Sets the tile loader of the layer.

This method is a shortcut for getTileController->setTileLoader().

Parameters
tileLoaderThe new IlvTilLoader for this layer.

◆ StartAll()

static void IlvTiledLayer::StartAll ( IlvManager manager)
static

Starts all the tiled layers of the specified manager.

Parameters
managerThe IlvManager.
See also
start().