Rogue Wave Views
Maps Package API Reference Guide
Product Documentation:

Rogue Wave 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)
 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...
 
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 ()
 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 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...
 

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 ( const IlvRect tileOrigin,
IlvTileCache cache = 0,
IlBoolean  startEnabled = IlTrue,
IlUShort  maxInList = IlvMaxObjectsInList,
IlUShort  maxInNode = IlvMaxObjectsInList 
)

Creates an instance of tiled layer.

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

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.
void IlvTiledLayer::fitTransformerToTile ( IlvView view,
IlInt  row,
IlInt  column 
) const

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.

Parameters
viewThe view.
rowThe row of the tile.
columnThe column of the tile.
IlvView* IlvTiledLayer::getDebugView ( ) const

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

Returns
The debug IlvView.
static IlvTiledLayer* IlvTiledLayer::GetFirstTiledLayer ( IlvManager manager)
static

Returns the first IlvTiledLayer of the manager or a null pointer if the manager does not contain any IlvTiledLayer.

Parameters
managerThe IlvManager.
Returns
The first IlvTiledLayer of this manager.
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.

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
IlvTileController* IlvTiledLayer::getTileController ( ) const

Returns the tile controller of the layer.

Returns
The IlvTileControler object of the layer.
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.
IlBoolean IlvTiledLayer::isDebugDrawingOnTop ( )

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.
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.
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 null, 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.
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.
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().

Parameters
rectThe 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().

Parameters
tileLoaderThe new IlvTilLoader for this layer.
static void IlvTiledLayer::StartAll ( IlvManager manager)
static

Starts all the tiled layers of the specified manager.

Parameters
managerThe IlvManager.
See also
start.

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