| GlsMap Toolkit 1.10.2

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
disti::GlsMapSymbology Class Reference

`#include <gls_map_symbology.h>`

Inheritance diagram for disti::GlsMapSymbology:

## Public Types
typedef Group | BaseClass

## Public Member Functions
| GlsMapSymbology (bool generateInstance=false)
| ~GlsMapSymbology () DISTI_METHOD_OVERRIDE
void | SetAvailableAttributes (unsigned int value) DISTI_METHOD_OVERRIDE
DisplayObject * | CloneObject (bool generateNames=false) DISTI_METHOD_OVERRIDE
void | CopyProperties (DisplayObject *src) DISTI_METHOD_OVERRIDE
InterfaceListType * | GetCppInterfaceDescription (InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
void | GetCppInterfaceDescriptionFree (InterfaceListType *array) DISTI_METHOD_OVERRIDE
void | PreDraw (const OpenGLMatrices &parentMatrices, Culler &culler) DISTI_METHOD_OVERRIDE
void | Draw (void) DISTI_METHOD_OVERRIDE
DisplayObject * | Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices) DISTI_METHOD_OVERRIDE
DisplayObject * | handle (DisplayEvent *ev) DISTI_METHOD_OVERRIDE
void | SetValue (int spec, va_list &args) DISTI_METHOD_OVERRIDE
GlsMapView * | GetMapView ()
virtual void | SetDataSource (GlsMapSymbologyDataSource *database)
GlsMapSymbologyDataSource * | GetDataSource ()
GlsMapSymbologyStdDataSource * | GetStdDataSource ()
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

## ◆ GlsMapSymbology()

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

Create a new GlsMapSymbology.

Parameters

  generateInstance | Whether or not to generate an instance name for this inputdevice

## ◆ ~GlsMapSymbology()

disti::GlsMapSymbology::~GlsMapSymbology | ( |  | ) |

Destructs a GlsMapSymbology object

## Member Function Documentation

## ◆ GetDataSource()

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.

## ◆ GetMapView()

GlsMapView * disti::GlsMapSymbology::GetMapView | ( |  | ) |
| inline

Returns
  pointer to the GlsMapView that the symbology will use for rendering or NULL if not found.

## ◆ GetStdDataSource()

GlsMapSymbologyStdDataSource * disti::GlsMapSymbology::GetStdDataSource | ( |  | ) |

Returns
  pointer to the GlsMapSymbologyStdDataSource for this symbology or NULL if another type of data source is being used.

## ◆ PickSymbols()

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

  view | The GlsMapView that was picked
  lev | A LocationEvent indicating the point that was picked
  iconsHit | IconIDList to receive the list of icons that were picked
  pathsHit | PathIDList to receive the list of paths that were picked

Returns
  true if an icon or path was picked

## ◆ SetDataSource()

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

  database | Pointer to the MapSymbologyDataSource to use

## ◆ SetDefaultPathColor()

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:

- gls_map_symbology.h
- gls_map_symbology.cpp