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

Detailed Description

A track aggregator which uses a hierarchy of tracks, typically mirroring their real-world relationships

To configure this aggregator the application must:

  • Create an instance of the aggregator
  • Create a hierarchy of TSLTracks and TSLTrackGroups as needed, ensuring that the hierarchyLevel of each track is set
  • Set the aggregator on any tracks which will be aggregated
  • Add rules to the aggregator to specify when/how aggregation should be performed

Classes

struct  AggregationRule
 

Public Member Functions

 TSLTrackAggregatorEchelon ()
 Constructor.
 
virtual ~TSLTrackAggregatorEchelon ()
 Destructor.
 
virtual TSLTrackAggregator::AggregatorType type () const
 
virtual TSLTrackBaseaggregateTrack (TSLTrackBase *track, const TSLRenderingInterface *renderingInterface)
 
uint32_t numRules () const
 
void addRule (const TSLTrackAggregatorEchelon::AggregationRule &rule)
 
void removeRule (uint32_t index)
 
TSLTrackAggregatorEchelon::AggregationRule queryRule (uint32_t index) const
 
TSLTrackAggregatorEchelon::AggregationRule operator[] (uint32_t index) const
 
- Public Member Functions inherited from TSLTrackAggregator
virtual void preProcess ()
 
virtual void postProcess ()
 
virtual uint32_t numAdditionalTracks () const
 
virtual TSLTrackBasegetAdditionalTrack (uint32_t index) const
 
virtual ~TSLTrackAggregator ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from TSLTrackAggregator
enum  AggregatorType { AggregatorCustom , AggregatorByEchelon , AggregatorByDensity }
 The types of aggregator provided by the MapLink API. More...
 
- Protected Member Functions inherited from TSLTrackAggregator
 TSLTrackAggregator ()
 

Constructor & Destructor Documentation

◆ TSLTrackAggregatorEchelon()

TSLTrackAggregatorEchelon::TSLTrackAggregatorEchelon ( )

Constructor.

◆ ~TSLTrackAggregatorEchelon()

virtual TSLTrackAggregatorEchelon::~TSLTrackAggregatorEchelon ( )
virtual

Destructor.

Member Function Documentation

◆ addRule()

void TSLTrackAggregatorEchelon::addRule ( const TSLTrackAggregatorEchelon::AggregationRule & rule)

Add an aggregation rule

Parameters
ruleThe rule to add

◆ aggregateTrack()

virtual TSLTrackBase * TSLTrackAggregatorEchelon::aggregateTrack ( TSLTrackBase * track,
const TSLRenderingInterface * renderingInterface )
virtual

This method will be called by the track manager to check whether a track is aggregated or not. The implementation of the aggregator performs its algorithm to determine this, and return the correct TSLTrackBase instance which should be rendered. If null is returned the provided track will not be rendered by the track manager

The algorithm will return null if no rules are set. The algorithm will return the input track if it has aggregation disabled. Otherwise the algorithm determines the rule that applies by checking the minimum resolution and zoom level. It then traverses up the track hierarchy tree to find the matching hierarchy level for the rule. The TrackGroup for that hierarchy level is returned.

The rendering interface is required to allow the aggregator access to draw-specific settings such as the extent of the drawing surface, or the zoom level of the display.

Parameters
trackThe input track
renderingInterfaceThe current rendering interface
Returns
the TSLTrackBase instance to be rendered.

Implements TSLTrackAggregator.

◆ numRules()

uint32_t TSLTrackAggregatorEchelon::numRules ( ) const

Query the number of configured AggregationRules

Returns
The number of aggregation rules

◆ operator[]()

TSLTrackAggregatorEchelon::AggregationRule TSLTrackAggregatorEchelon::operator[] ( uint32_t index) const

Array operator - Will query rules within the aggregator

See also
queryRule

◆ queryRule()

TSLTrackAggregatorEchelon::AggregationRule TSLTrackAggregatorEchelon::queryRule ( uint32_t index) const

Query an aggregation rule

Parameters
indexThe index of the rule to query
Returns
The requested rule, or NULL on error

◆ removeRule()

void TSLTrackAggregatorEchelon::removeRule ( uint32_t index)

Remove an aggregation rule

Parameters
indexThe index of the rule to remove

◆ type()

virtual TSLTrackAggregator::AggregatorType TSLTrackAggregatorEchelon::type ( ) const
virtual

Query the type of the aggregator

Returns
The type of the aggregator

Implements TSLTrackAggregator.