GL Studio C++ Runtime API
GlsMapChartDataSource Class Referenceabstract

#include <gls_map_chart_data_source.h>

Inheritance diagram for GlsMapChartDataSource:
AifMapChartDataSource CADRGMapChartDataSource DNCMapChartDataSource DTEDMapChartDataSource GeoTIFFMapChartDataSource ShapefileMapChartDataSource

Public Member Functions

virtual ~GlsMapChartDataSource ()
 Destructor for abstract base class.
 
virtual bool GetAvailableCoverage (GeoRect *dest)=0
 
virtual unsigned long GetBestLayer (GlsMapView *view, GlsMapChart *chart) const
 
virtual void GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList)=0
 
virtual void PostDraw (GlsMapView *view, GlsMapChart *chart)
 
virtual bool AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart)
 

Protected Member Functions

 GlsMapChartDataSource ()
 Constructor for subclasses.
 

Detailed Description

/class MapDataSource

Abstract base class to encapsulate map library specific code and data.

Provides a list of MapCells for a given coverage area and layer. A MapDataSource may have just one layer or many layers of MapCells available.

Member Function Documentation

virtual bool AreAllCellsLoaded ( GlsMapView view,
GlsMapChart chart 
)
virtual

Returns if all of the visible cells have finished loading and will be visible on the next frame

Parameters
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn
Returns
If all cells are loaded in a view

Reimplemented in DTEDMapChartDataSource.

virtual bool GetAvailableCoverage ( GeoRect dest)
pure 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. 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)

Implemented in ShapefileMapChartDataSource, DNCMapChartDataSource, CADRGMapChartDataSource, AifMapChartDataSource, GeoTIFFMapChartDataSource, and DTEDMapChartDataSource.

virtual unsigned long GetBestLayer ( GlsMapView view,
GlsMapChart chart 
) const
inlinevirtual

Returns the cell layer ('zoom level') that best matches the given area

Parameters
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn
Returns
The recommended layer to use
Note
Data sources that do not support layers should always return 0.

Reimplemented in ShapefileMapChartDataSource, DNCMapChartDataSource, and CADRGMapChartDataSource.

virtual void GetCellList ( const GeoRect coverage,
unsigned long  layerID,
double  viewLogicalHeight,
double  viewGeoHeight,
MapChartCellList viewList 
)
pure 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
coverageGeoRect describing the requested area
layerIDWhich layer to return MapCells from
viewLogicalHeightThe height of the view in logical units
viewGeoHeightThe height of the view in geographic units
viewListPointer MapChartCellList to recieve the list of available cells

Implemented in ShapefileMapChartDataSource, DNCMapChartDataSource, CADRGMapChartDataSource, AifMapChartDataSource, GeoTIFFMapChartDataSource, and DTEDMapChartDataSource.

virtual void PostDraw ( GlsMapView view,
GlsMapChart chart 
)
inlinevirtual

Called after all the cells have been drawn to allow the data source to perform additional rendering if needed

Parameters
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn

Reimplemented in DNCMapChartDataSource.


The documentation for this class was generated from the following file: