#include <gls_map_aif.h>
Runtime implementation of an AifMapChartDataSource
AifMapChartDataSource::AifMapChartDataSource |
( |
bool |
UseDefaultCache = true | ) |
|
void AifMapChartDataSource::AddOverlay |
( |
std::string |
overlay, |
|
|
double |
resolution |
|
) |
| |
Add an overlay layer to the list of layers to display.
- Parameters
-
overlay | The name of the overlay layer to display. Must correspond to an overlay defined in the AIF file. |
resolution | The resolution of the overlay to display. Must correspond to a resolution of an overlay defined in the AIF file. |
bool AifMapChartDataSource::GetAvailableCoverage |
( |
GeoRect * |
dest | ) |
|
|
virtual |
Sets a GeoRect to describe the area containing all areas covered by this MapDataSource. This area may change as different databases are loaded. Calling this method may be slow.
- Parameters
-
dest | Pointer to a GeoRect to recieve the coverage. |
- Returns
- true on success (dest contains the coverage description) or false if there was an error (dest is undefined)
Implements disti::GlsMapChartDataSource.
Returns the cell layer ('zoom level') that best matches the given area.
- Parameters
-
- Returns
- The recommended layer to use.
Implements disti::GlsMapChartDataSource.
void AifMapChartDataSource::GetCellList |
( |
const GeoRect & |
coverage, |
|
|
unsigned long |
layerID, |
|
|
MapChartCellList * |
viewList |
|
) |
| |
|
virtual |
Get the list of the available cells in a given coverage area. The caller will AddRef() any of the cells that it will be holding a reference to.
- Parameters
-
coverage | GeoRect describing the requested area. |
layerID | Which layer to return MapCells from. |
viewList | Pointer MapChartCellList to recieve the list of available cells |
Implements disti::GlsMapChartDataSource.
double AifMapChartDataSource::GetTargetCellLoadRate |
( |
void |
| ) |
const |
Get the target rate in hz at which cells will be loaded
- Returns
- target rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible )
void AifMapChartDataSource::InsertOverlay |
( |
int |
index, |
|
|
std::string |
overlay, |
|
|
double |
resolution |
|
) |
| |
Insert an overlay layer to the list of layers to display at the given position.
- Parameters
-
index | The index to insert the overlay at, if -1 or greater than the length of the overlay list then inserts at end. |
overlay | The name of the overlay layer to display. Must correspond to an overlay defined in the AIF file. |
resolution | The resolution of the overlay to display. Must correspond to a resolution of an overlay defined in the AIF file. |
void AifMapChartDataSource::InstallViewManager |
( |
AIFViewManager & |
mgr | ) |
|
Install the view manager. The view manager (after being initialized by the user) will set this class up to add/remove overlays automatically based on the view height
- Parameters
-
void AifMapChartDataSource::LoadAifFile |
( |
std::string |
filename | ) |
|
Load an AIF File with the given file name.
- Parameters
-
filename | The name of the AIF file to load. Can be absolute or relative to the executing directory. |
Called after all the cells have been drawn to allow the data source to perform additional rendering if needed.
- Parameters
-
Reimplemented from disti::GlsMapChartDataSource.
void AifMapChartDataSource::PreCache |
( |
const GeoRect & |
area | ) |
|
Precache based on geo-rect area. This uses the AIFMapChartCache as the mechanism to precache images
- Parameters
-
area | Geometric rect area to pre-cache |
void AifMapChartDataSource::PreCache |
( |
const double |
resolution | ) |
|
Precache based on resolution
- Parameters
-
resolution | Resolution to precache at. |
void AifMapChartDataSource::RemoveOverlay |
( |
std::string |
overlay, |
|
|
double |
resolution |
|
) |
| |
Remove an overlay layer from the list of layers to display.
- Parameters
-
overlay | The name of the overlay layer to remove. Must correspond to an overlay defined in the AIF file. |
resolution | The resolution of the overlay to remove. Must correspond to a resolution of an overlay defined in the AIF file. |
void AifMapChartDataSource::RemoveOverlay |
( |
std::string |
overlay | ) |
|
Remove all overlay layers with the given overlay name.
- Parameters
-
overlay | The name of the set of overlay layers to remove. |
void AifMapChartDataSource::RemoveOverlay |
( |
double |
resolution | ) |
|
Remove all overlay layers with the given resolution.
- Parameters
-
resolution | The resolution of the set of overlay layers to remove. |
If using custom cache, set it here. Caller responsible for its deallocation if necessary
- Parameters
-
void AifMapChartDataSource::SetCacheSize |
( |
const float |
memSize | ) |
|
- Parameters
-
memSize | Set the cached size (megabytes) of images |
Set the size of the cache in MB
void AifMapChartDataSource::SetTargetCellLoadRate |
( |
const double |
targetCellLoadRate | ) |
|
Set the target rate in hz at which cells will be loaded
- Parameters
-
targetCellLoadRate | target rate in hz else 0.0 for no target rate ( i.e. load as quickly as possible ) |
ResolutionList disti::AifMapChartDataSource::_resolutionList |
|
protected |
A list of the resolutions in this AIF file for speeding up the selection of a resolution at cell load list time.
The documentation for this class was generated from the following files:
- gls_map_aif.h
- gls_map_aif.cpp