GlsMap Toolkit  1.4.2
disti::GlsMapSymbology Class Reference

#include <gls_map_symbology.h>

+ Inheritance diagram for disti::GlsMapSymbology:

Public Member Functions

 GlsMapSymbology (bool generateInstance=false)
 
virtual ~GlsMapSymbology ()
 
virtual void SetAvailableAttributes (unsigned int value)
 
virtual DisplayObject * CloneObject (bool generateNames=false)
 
virtual void CopyProperties (DisplayObject *src)
 
virtual InterfaceListType * GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL)
 
virtual void GetCppInterfaceDescriptionFree (InterfaceListType *array)
 
virtual void PreDraw (const OpenGLMatrices &parentMatrices, Culler &culler)
 
virtual void Draw (void)
 
virtual DisplayObject * Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)
 
virtual DisplayObject * handle (DisplayEvent *ev)
 
virtual void SetValue (int spec, va_list &args)
 
GlsMapViewGetMapView ()
 
virtual void SetDataSource (GlsMapSymbologyDataSource *database)
 
GlsMapSymbologyDataSourceGetDataSource ()
 
GlsMapSymbologyStdDataSourceGetStdDataSource ()
 
virtual bool PickSymbols (GlsMapView *view, LocationEvent *lev, GlsMapSymbologyDataSource::IconIDList *iconsHit, GlsMapSymbologyDataSource::PathIDList *pathsHit)
 
void SetDefaultPathColor (const glsColor &value)
 
glsColor GetDefaultPathColor ()
 

Static Public Member Functions

static DisplayObject * CreateInstance ()
 

Protected Attributes

GlsMapSymbologyDataSource_dataSource
 
GlsMapSymbologyStdDataSource_internalDataSource
 
DisplayObject * _defaultPathGeometry
 

Friends

class GlsMapSymbologyEditor
 

Detailed Description

The GlsMapSymbology class is a Group that contains a collection of DisplayObjects that can be thought of as 'icon templates'. When drawing, the MapSymbologyLayer will query it's MapSymbologyDataSource for the list of visible icons and paths, then render them to the map using the icon templates. The MapSymbologyDataSource interface is simple, while still allowing the MapSymbologyDataSource the ability to override the appearance of icons and paths.

When a new GlsMapSymbology instance is first created, it will create it's own GlsMapSymbologyStdDataSource which provides an interface for the user to create/update icons and paths without having to write their own MapSymbologyDataSource class. While this class provides much of the common functionality that is needed, some users will still want to create their own MapSymbologyDataSource to provide the best performance when working with their own datasets. These users have the option of deriving from the BasicDataSource class (a template class which provides basic functionality) or deriving directly from MapSymbologyDataSource interface to optimize all of the MapSymbologyDataSource code for their data set.

Constructor & Destructor Documentation

disti::GlsMapSymbology::GlsMapSymbology ( bool  generateInstance = false)

Create a new GlsMapSymbology.

Parameters
generateInstanceWhether or not to generate an instance name for this inputdevice
disti::GlsMapSymbology::~GlsMapSymbology ( )
virtual

Destructs a GlsMapSymbology object

Member Function Documentation

GlsMapSymbologyDataSource* disti::GlsMapSymbology::GetDataSource ( )
inline

Returns the MapSymbologyDataSource that this object is using. This may be the default GlsMapSymbologyStdDataSource or another data source that was provided using the SetDataSource() method.

Returns
pointer to the MapSymbologyDataSource this GlsMapSymbology is using.
GlsMapView* disti::GlsMapSymbology::GetMapView ( )
inline
Returns
pointer to the GlsMapView that the symbology will use for rendering or NULL if not found.
GlsMapSymbologyStdDataSource * disti::GlsMapSymbology::GetStdDataSource ( )
Returns
pointer to the GlsMapSymbologyStdDataSource for this symbology or NULL if another type of data source is being used.
bool disti::GlsMapSymbology::PickSymbols ( GlsMapView view,
LocationEvent *  lev,
GlsMapSymbologyDataSource::IconIDList *  iconsHit,
GlsMapSymbologyDataSource::PathIDList *  pathsHit 
)
virtual

This method can be called by the user in their GlsMapView event callback.

Utility method that can be called by the user from the GlsMapView event callback to determine if any symbols were picked. If the method returns true, then iconsHit and pathsHit will contain the list of icons and paths that were picked. NOTE: This method uses the generic MapSymbologyDataSource interface in it's picking algorithm. If you are using a derived DataSource class that has it's own picking method, it will probably be faster than this method.

Parameters
viewThe GlsMapView that was picked
levA LocationEvent indicating the point that was picked
iconsHitIconIDList to receive the list of icons that were picked
pathsHitPathIDList to receive the list of paths that were picked
Returns
true if an icon or path was picked
void disti::GlsMapSymbology::SetDataSource ( GlsMapSymbologyDataSource database)
virtual

Set the MapSymbologyDataSource to use for rendering. The creator of the MapSymbologyDataSource instance is responsible for deleting it.

Parameters
databasePointer to the MapSymbologyDataSource to use
void disti::GlsMapSymbology::SetDefaultPathColor ( const glsColor &  value)

Set the default color for path lines This is only used if the MapSymbologyDataSource does not provide geometry for the paths


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