MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLTrackGroup Class Reference
Inheritance diagram for TSLTrackGroup:

Detailed Description

This class is used to define the attributes of a track group, and how the object should be rendered.

After a track group is created, a symbol must be provided the symbol will define the base rendering should it be necessary. A trackgroup may contain multiple Point symbols, in order to define alternate rendering based on the current display resolution. If additional symbols are added to the trackgroup, the TSLTrackSymbol::maximumResolution parameter will be used to determine which symbol will be drawn.

TrackGroups are not associated to a TrackDisplayManager and are used to provide a hierarchy for track aggregation where set rules may cause a track to be drawn as it's parent group instead.

This class should mainly be used for the initial setup of a trackgroup, and for infrequent updates of symbol rendering.

This class is reference counted internally to allow objects to be shared within the track manager SDK

  • Ownership of this object will never be transferred from the application to MapLink
  • The application must call release() in order to relinquish its ownership, even if the object has been passed to another

Public Member Functions

virtual TSLTrackBaseclone () const
 
virtual TSLTrackBase::TrackType type () const
 
void addChild (TSLTrackBase *child)
 
void removeChild (uint32_t index)
 
uint32_t numberOfChildren ()
 
TSLTrackBasechildAt (uint32_t index) const
 
double latitude () const
 
double currentLatitude () const
 
double longitude () const
 
double currentLongitude () const
 
- Public Member Functions inherited from TSLTrackBase
void release ()
 
AggregationState aggregationState () const
 
void allowAggregation (bool allow)
 
void hierarchyLevel (uint32_t level)
 
uint32_t hierarchyLevel () const
 
TSLTrackBase::TrackID trackNumber () const
 
void aggregator (TSLTrackAggregator *aggregator)
 
TSLTrackAggregatoraggregator () const
 
void hierarchyAggregator (TSLTrackAggregatorEchelon *aggregator)
 
TSLTrackAggregatorEchelonhierarchyAggregator () const
 
double latitude () const
 
double currentLatitude () const
 
double longitude () const
 
double currentLongitude () const
 
double velocity () const
 
double currentVelocity () const
 
double heading () const
 
double currentHeading () const
 
double altitude () const
 
double currentAltitude () const
 
bool addAttribute (const char *name, const char *key, bool staticAttribute)
 
bool setAttributeValue (const char *name, const char *value)
 
const char * getAttributeName (const char *key) const
 
const char * getAttributeKey (const char *name) const
 
const char * getAttributeValue (const char *name) const
 
const char * getCurrentAttributeValue (const char *name) const
 
bool queryAttribute (unsigned int index, TSLSimpleString *name, TSLSimpleString *key, TSLSimpleString *value) const
 
unsigned int numAttributes () const
 
bool deleteAttribute (const char *name)
 
void deleteAttributes ()
 Delete all attributes.
 
bool addSymbol (TSLTrackSymbol *symbol)
 
void clearHistoryPointColour ()
 Clear the override colour for history points/symbols.
 
void historyPointColour (const TSLRGBA &colour)
 
bool updateSymbol (uint32_t index, TSLTrackSymbol *symbol)
 
void removeSymbol (uint32_t index)
 
uint32_t numberOfSymbols () const
 
TSLTrackSymbolsymbolAt (uint32_t index) const
 
void visible (int drawingSurfaceID, bool visibility)
 
void select (int drawingSurfaceID, bool selected)
 
bool selected (int drawingSurfaceID)
 
void velocity (double velocity)
 
void heading (double heading)
 
void altitude (double altitude)
 
void trackName (const char *name)
 
void userID (uint32_t id)
 
uint32_t userID () const
 
const char * trackName () const
 
void historyPointsVisible (int drawingSurfaceID, bool visibility)
 
void featureID (TSLFeatureID featureID)
 
TSLFeatureID featureID () const
 
bool featureName (const char *featureName)
 
void parentGroup (TSLTrackBase *parentGroup)
 
TSLTrackBaseparentGroup ()
 
void * p () const
 

Static Public Member Functions

static TSLTrackGroupcreate ()
 
static TSLTrackGroupcreate (TSLTrackSymbol *symbol)
 

Additional Inherited Members

- Public Types inherited from TSLTrackBase
enum  TrackType { Track , TrackGroup }
 
enum  AggregationState { AggregationDisabled , AggregationEnabled , AggregationDisabledByGraphic }
 
typedef uint32_t TrackID
 
- Protected Member Functions inherited from TSLTrackBase
 TSLTrackBase ()
 
 TSLTrackBase (const TSLTrackBase &other)
 
virtual ~TSLTrackBase ()
 
void operator delete (void *ptr)
 

Member Function Documentation

◆ addChild()

void TSLTrackGroup::addChild ( TSLTrackBase * child)

Add a child to the group

Adds a child to the group to create a hierarchical link between the two. The child can be any TSLTrackBase type, TSLTrack or TSLTrackGroup. The link is one way only.

Parameters
childThe child TSLTrackBase to add to the group.

◆ childAt()

TSLTrackBase * TSLTrackGroup::childAt ( uint32_t index) const

Get the child at the provided index

The child provided by this method will need to be cast to the appropriate type before calling methods associated solely with TSLTrackGroup or TSLTrack.

Parameters
indexThe index of the child to query.
Returns
A TSLTrackBase pointer.

◆ clone()

virtual TSLTrackBase * TSLTrackGroup::clone ( ) const
virtual

Create a clone of this TSLTrackGroup.

Historic data from the source trackgroup and referenced symbols will be copied, however the per-surface state and history points will not.

Returns
A clone of this TrackGroup.

Implements TSLTrackBase.

◆ create() [1/2]

static TSLTrackGroup * TSLTrackGroup::create ( )
static

Create a TSLTrackGroup

After calling this method the application must call addSymbol in order to define the visualisation of the track

◆ create() [2/2]

static TSLTrackGroup * TSLTrackGroup::create ( TSLTrackSymbol * symbol)
static

Create a TSLTrackGroup

The provided symbol will define the base rendering of this group, and must be a PointSymbol.

If alternate resolution-based rendering is required for this group, additional symbols should be added with the addSymbol method.

The group will take a reference to the TSLTrackSymbol, which may be shared between multiple tracks/groups. The application may continue to use the symbol for as long as it holds a reference.

Parameters
symbolThe symbol to display for the group, at all resolutions.
Returns
A new TSLTrackGroup object, or NULL if an invalid symbol was provided.

◆ currentLatitude()

double TSLTrackGroup::currentLatitude ( ) const

Query the latitude of the track group at the current time.

Returns
The current latitude of the track group in WGS84.

◆ currentLongitude()

double TSLTrackGroup::currentLongitude ( ) const

Query the longitude of the track group at the current time.

Returns
The current longitude of the track group in WGS84.

◆ latitude()

double TSLTrackGroup::latitude ( ) const

Query the latitude of the track group at the display time of the TSLTrackDisplayManager.

Returns
The latitude of the track group in WGS84.

◆ longitude()

double TSLTrackGroup::longitude ( ) const

Query the longitude of the track group at the display time of the TSLTrackDisplayManager.

Returns
The longitude of the track group in WGS84.

◆ numberOfChildren()

uint32_t TSLTrackGroup::numberOfChildren ( )

Get the number of children of this group

Returns the number of children directly associcated with this group. This method will not search through the tree of it's children.

Returns
The number of children directly associated with this group.

◆ removeChild()

void TSLTrackGroup::removeChild ( uint32_t index)

Remove a child from the group

Removes the child at the index from the group. This will delete the child if no other references are held.

Parameters
indexThe index of the child to remove from the group.

◆ type()

virtual TSLTrackBase::TrackType TSLTrackGroup::type ( ) const
virtual

Get the TSLTrackBase::TrackType of this group

Returns
The TSLTrackBase::TrackType of this group

Implements TSLTrackBase.