rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvTiledLayer Class Reference

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

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

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

List of all members.

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.
virtual void draw (IlvPort *port, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) const
 Draws the content of the layer.
void fitTransformerToTile (IlvView *view, IlInt row, IlInt column) const
 Sets the transformer of view so that the specified tile is fully visible.
IlvViewgetDebugView () const
 Returns the debug view of the layer if it has been specified.
virtual IlvMapsError getInitStatus () const
 Returns the initialization status of this tiled layer.
const IlvRectgetSize () const
 Returns the size of the layer if it has been specified.
IlvTileControllergetTileController () const
 Returns the tile controller of the layer.
IlvTileLoadergetTileLoader () const
 Returns the tile loader of the layer.
IlBoolean isDebugDrawingOnTop ()
 Specifies whether the debug graphics are to be drawn above or under the graphics.
void setDebugDrawingOnTop (IlBoolean set)
 Tells the debug view if it should draw the drawing on the top.
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.
void setSize (const IlvRect &rect)
 Specifies the area in which the tiles are contained.
void setTileLoader (IlvTileLoader *tileLoader)
 Sets the tile loader of the layer.
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.
static void StartAll (IlvManager *manager)
 Starts all the tiled layers of the specified manager.

Protected Member Functions

virtual void setInitStatus (IlvMapsError status)
 Sets the initialization status of this layer.

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.

IlvTiledLayer.jpg

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

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:
manager The 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.

Reimplemented in IlvGeoTIFFLayer, IlvImageLayer, and IlvShapeFileLayer.

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

Parameters:
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.
virtual void IlvTiledLayer::setInitStatus ( IlvMapsError  status  )  [protected, virtual]

Sets the initialization status of this layer.

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

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

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

Parameters:
tileLoader The new IlvTilLoader for this layer.
static void IlvTiledLayer::StartAll ( IlvManager manager  )  [static]

Starts all the tiled layers of the specified manager.

Parameters:
manager The IlvManager.
See also:
start.

© Copyright 2012, 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.