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

Detailed Description

TSLTrack class, for use with the TSLTrackDisplayManager.

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

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

The track's parameters, such as position and velocity may be updated using this class, however the update methods on the TSLTrackDisplayManager class should be used when updating multiple tracks at once.

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

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 TSLTrackBase::TrackType type () const
 
virtual TSLTrackBaseclone () const
 
void move (double latitude, double longitude)
 
bool existsAtDisplayTime () 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 TSLTrackcreate ()
 
static TSLTrackcreate (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

◆ clone()

virtual TSLTrackBase * TSLTrack::clone ( ) const
virtual

Create a clone of this TSLTrack.

The cloned object will not be attached to any TSLTrackDisplayManager Historic data from the source track and referenced symbols will be copied, however the per-surface state and history points will not.

If a clone needs to be created while preserving this data, the TSLTrackDisplayManager::cloneTrackInto method should be used.

Returns
A clone of this Track.

Implements TSLTrackBase.

◆ create() [1/2]

static TSLTrack * TSLTrack::create ( )
static

Create a TSLTrack

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

◆ create() [2/2]

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

Create a TSLTrack

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

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

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

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

◆ existsAtDisplayTime()

bool TSLTrack::existsAtDisplayTime ( ) const

Returns whether the track is valid for the current display time in the TSLTrackDisplayManager the track is in.

A track may not exist if the display time in the manager is before the track was created, or after the track was destroyed.

Returns
true if this track is valid for the display time, false otherwise.

◆ move()

void TSLTrack::move ( double latitude,
double longitude )

Update the position of the track.

All latitude and longitude values provided to the Track Manager SDK must be in the WGS84 datum.

Parameters
latitudeThe new latitude of the track.
longitudeThe new longitude of the track.

◆ type()

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

Implements TSLTrackBase.