rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Maps Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

Public Member Functions

 IlvCADRGLayer (const IlvCADRGCoverage &coverage, const IlvMapAdapter *adapter=0, IlvTileCache *cache=0)
 Creates an instance of an IlvCADRGLayer.
void fitToPreferredZoomFactor (IlvView *view, IlBoolean redraw=IlTrue) const
 Sets the zoom factor of the view to the preferred zoom factor of the layer.
IlvFeatureRenderergetImageRenderer () const
 Returns the feature renderer used for creating graphic objects representing the CADRG subframes.
IlDouble getPreferredScale ()
 Returns the scale at which a pixel on the screen corresponds to a pixel on a CADRG image.
IlFloat getPreferredZoomFactor () const
 Returns the preferred zoom factor to display the layer.
void setImageRenderer (const IlvFeatureRenderer &renderer)
 Specifies a feature renderer used for creating graphic objects representing the CADRG subframes.

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 ( const IlvCADRGCoverage coverage,
const IlvMapAdapter adapter = 0,
IlvTileCache cache = 0 
)

Creates an instance of an IlvCADRGLayer.

Parameters:
coverage The coverage of the layer.
adapter The 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).
cache This 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

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:
view The view that will be affected by the operation. This view must be owned by the manager of the layer.
redraw Specifies if the view must be refreshed after the operation.
See also:
getPreferredZoomFactor.
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 a null pointer if the layer has not been added to an IlvManager.

Returns:
A null pointer 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.
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.
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.
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:
renderer The feature renderer to be used.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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