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

This class implements a CADRG layer that displays a CADRG coverage using the load-on-demand process. More...

#include <ilviews/maps/format/cadrg/cadrglayer.h>

Inheritance diagram for IlvCADRGLayer:
IlvTiledLayer IlvManagerLayer IlvIndexedSet

Public Member Functions

 IlvCADRGLayer (const IlvCADRGCoverage &coverage, const IlvMapAdapter *adapter=0, IlvTileCache *cache=0)
 Initializes a new instance of a IlvCADRGLayer. More...
 
void fitToPreferredZoomFactor (IlvView *view, IlBoolean redraw=IlTrue) const
 Sets the zoom factor of the view to the preferred zoom factor of the layer. More...
 
IlvFeatureRenderergetImageRenderer () const
 Returns the feature renderer used for creating graphic objects representing the CADRG subframes. More...
 
IlDouble getPreferredScale ()
 Returns the scale at which a pixel on the screen corresponds to a pixel on a CADRG image. More...
 
IlFloat getPreferredZoomFactor () const
 Returns the preferred zoom factor to display the layer. More...
 
void setImageRenderer (const IlvFeatureRenderer &renderer)
 Specifies a feature renderer used for creating graphic objects representing the CADRG subframes. More...
 
- Public Member Functions inherited from IlvTiledLayer
 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvTiledLayer
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 inherited from IlvTiledLayer
virtual void setInitStatus (IlvMapsError status)
 Sets the initialization status of this layer. More...
 

Detailed Description

This class implements a CADRG layer that displays a CADRG coverage using the load-on-demand process.

Library: ilvmaps

This layer reads a CADRG coverage and loads automatically the frames that are visible in the views associated with its manager. It unloads the frames that are not visible.

IlvCADRGLayer works only with the geographic projection.

See also
IlvCADRGTocReader.

Constructor & Destructor Documentation

◆ IlvCADRGLayer()

IlvCADRGLayer::IlvCADRGLayer ( const IlvCADRGCoverage coverage,
const IlvMapAdapter adapter = 0,
IlvTileCache cache = 0 
)

Initializes a new instance of a IlvCADRGLayer.

Parameters
coverageThe coverage of the layer.
adapterThe adapter used to translate geographic coordinates into manager coordinates. If this optional argument is not passed, the layer uses an IlvMapAdapter initialized by IlvMapAdapter(new IlvGeographicProjection, 1).
cacheThis optional argument specifies the cache of the layer. If this argument is not passed, the singleton cache returned by IlvDefaultTileCache::GetDefaultCache() is used.

Member Function Documentation

◆ fitToPreferredZoomFactor()

void IlvCADRGLayer::fitToPreferredZoomFactor ( IlvView view,
IlBoolean  redraw = IlTrue 
) const

Sets the zoom factor of the view to the preferred zoom factor of the layer.

This function can only be used if the layer is added to a manager.

Parameters
viewThe view that will be affected by the operation. This view must be owned by the manager of the layer.
redrawSpecifies if the view must be refreshed after the operation.
See also
getPreferredZoomFactor().

◆ getImageRenderer()

IlvFeatureRenderer* IlvCADRGLayer::getImageRenderer ( ) const

Returns the feature renderer used for creating graphic objects representing the CADRG subframes.

By default, it is a IlvDefaultImageRenderer. This function can return 0 if the layer has not been added to an IlvManager.

Returns
0 if the layer has not been added to an IlvManager, or an IlvFeatureRenderer that must not be deleted. However, the returned renderer can be modified to change its parameters.

◆ getPreferredScale()

IlDouble IlvCADRGLayer::getPreferredScale ( )

Returns the scale at which a pixel on the screen corresponds to a pixel on a CADRG image.

Returns
The preferred scale.

◆ getPreferredZoomFactor()

IlFloat IlvCADRGLayer::getPreferredZoomFactor ( ) const

Returns the preferred zoom factor to display the layer.

The function returns 1 if the layer has not been initialized correctly or if it is not added to an IlvManager.

Returns
The preferred zoom factor to display the layer. With this zoom factor, one pixel of the CADRG image will correspond exactly to one pixel on the screen. With other zoom factors, the image is stretched.

◆ setImageRenderer()

void IlvCADRGLayer::setImageRenderer ( const IlvFeatureRenderer renderer)

Specifies a feature renderer used for creating graphic objects representing the CADRG subframes.

The image renderer must support the IlvMapImage geometry. If this function is not called, the layer will use an instance of IlvDefaultImageRenderer. The layer stores a copy of the renderer.

Parameters
rendererThe feature renderer to be used.