A TSLTrackPointSymbol defines the rendering of a TSLTrack object, as a set of MapLink entities
A point symbol may contain multiple TSLEntities. These will be drawn in the order they are added, with the last-added on top.
Rendering attributes for a TSLTrackPointSymbol must be defined by the application when entities are added. The point symbol is otherwise treated as a single entity, which is assigned a top-level feature ID for decluttering/picking functionality.
The following Track attributes will be displayed if present within a TSLSymbol (TMF Symbol created through Symbol Studio):
The position and attributes used for drawing these objects is specified by the symbol. These may be modified using symbol studio.
This class is reference counted internally to allow objects to be shared within the track manager SDK
Classes | |
struct | HeadingIndicatorBand |
Defines the parameters of a heading indicator 'band'. More... | |
Static Public Member Functions | |
static TSLTrackPointSymbol * | create () |
Create a TSLTrackPointSymbol. More... | |
Additional Inherited Members | |
![]() | |
enum | HeadingIndicatorStyle { HeadingIndicatorNone , HeadingIndicatorSimple , HeadingIndicatorFilled } |
Specifies the type of heading indicator to display. More... | |
enum | Type { PointSymbol , HistorySymbol } |
Specifies the type of a TSLTrackSymbol. More... | |
enum | SelectionBehaviour { SelectionBehaviourAdditional , SelectionBehaviourReplace } |
![]() | |
TSLTrackSymbol () | |
TSLTrackSymbol (const TSLTrackSymbol *other) | |
TSLTrackSymbol (const TSLTrackSymbol &other) | |
TSLTrackSymbol & | operator= (const TSLTrackSymbol &other) |
virtual | ~TSLTrackSymbol () |
void | operator delete (void *ptr) |
struct TSLTrackPointSymbol::HeadingIndicatorBand |
Defines the parameters of a heading indicator 'band'.
Class Members | ||
---|---|---|
double | length | The heading indicator length within the speed band. |
TSLDimensionUnits | lengthUnit | The heading indicator length unit within the speed band. |
double | minSpeed | The minimum speed within the speed band. |
uint32_t | numArrowHeads | The number of arrow heads within the speed band. |
void TSLTrackPointSymbol::addHeadingIndicatorBand | ( | const HeadingIndicatorBand & | band | ) |
Add heading indicator band.
By default there will be a single band. This may be modified either by calling getHeadingIndicatorBand(0) or by calling headingIndicatorLength and similar methods. If the track's speed is within a speed band, the heading indicator will be displayed according to the band's parameters.
If the input band has speed <= 0, update the default band-0. If another band with the same speed already exists, update it.
band | Heading indicator band. |
void TSLTrackPointSymbol::addSymbolEntity | ( | const TSLEntity * | entity, |
bool | rotateToTrackHeading | ||
) |
Add symbol entity to the parent point symbol.
The provided entity will be cloned, so the application retains ownership of this entity.
entity | The TSLEntity to add to the point symbol. |
rotateToTrackHeading | If true entity will rotate to the track heading. |
void TSLTrackPointSymbol::clearHeadingIndicatorBands | ( | ) |
Remove all the heading indicator bands except the default band with index = 0.
|
virtual |
Create a clone of this symbol.
Implements TSLTrackSymbol.
|
static |
Create a TSLTrackPointSymbol.
TSLEntity * TSLTrackPointSymbol::entityAt | ( | uint32_t | index | ) | const |
Query the symbol entity in the parent point symbol.
index | The index of the symbol. |
const TSLRenderingAttributes & TSLTrackPointSymbol::getHeadingRendering | ( | ) | const |
Query the rendering attributes used for drawing the heading indicator.
double TSLTrackPointSymbol::headingIndicatorAcuity | ( | ) | const |
Query the heading indicator acuity.
void TSLTrackPointSymbol::headingIndicatorAcuity | ( | double | acuity | ) |
Set the acuity angle of the heading indicator arrow.
The acuity of an arrow head is the angle between the tail of the arrow and the inside of the arrow head
acuity | The acuity angle in degrees, between 0.0 and 90.0 |
HeadingIndicatorBand & TSLTrackPointSymbol::headingIndicatorBand | ( | uint32_t | index | ) |
Access a heading indicator band
The application may modify the returned band. Extra care has to be taken if modifying the minimum speed of the default heading indicator band with index = 0.
index | index of the band to remove. |
bool TSLTrackPointSymbol::headingIndicatorDrawOrder | ( | ) | const |
Query the point symbol's heading indicator draw order.
void TSLTrackPointSymbol::headingIndicatorDrawOrder | ( | bool | behindTracks | ) |
Set the heading indicator draw order.
behindTracks | The draw order of heading indicator. |
TSLDimensionUnits TSLTrackPointSymbol::headingIndicatorOriginOffsetUnit | ( | ) | const |
Query the units of the heading indicator origin
double TSLTrackPointSymbol::headingIndicatorOriginOffsetX | ( | ) | const |
Query the origin of the heading indicator
double TSLTrackPointSymbol::headingIndicatorOriginOffsetY | ( | ) | const |
Query the origin of the heading indicator
HeadingIndicatorStyle TSLTrackPointSymbol::headingIndicatorStyle | ( | ) |
Query the type of the heading indicator
void TSLTrackPointSymbol::headingIndicatorStyle | ( | HeadingIndicatorStyle | style | ) |
Set the type of heading indicator to display
style | The style used for drawing the heading indicator. |
double TSLTrackPointSymbol::headingIndicatorWidth | ( | ) | const |
Query the heading indicator width.
void TSLTrackPointSymbol::headingIndicatorWidth | ( | double | width, |
TSLDimensionUnits | unit | ||
) |
Set the heading indicator width.
width | The width of heading indicator. |
unit | The units of the heading indicator width. |
TSLDimensionUnits TSLTrackPointSymbol::headingIndicatorWidthUnit | ( | ) | const |
Query the units of the heading indicator width
uint32_t TSLTrackPointSymbol::numEntities | ( | ) | const |
Query the number of entities within the point symbol.
uint32_t TSLTrackPointSymbol::numHeadingIndicatorBands | ( | ) | const |
Query the number of the heading indicator bands.
bool TSLTrackPointSymbol::removeHeadingIndicatorBand | ( | uint32_t | index | ) |
Remove a heading indicator band.
The default band-0 can't be removed.So, if input index is 0, the method will do nothing and return false. If the input index is more than the number of bands, the method will do nothing and return false.
index | index of the band to remove. |
void TSLTrackPointSymbol::removeSymbolEntity | ( | uint32_t | index | ) |
Remove symbol entity in the parent point symbol.
index | The index of the symbol. |
bool TSLTrackPointSymbol::rotateEntityToTrackHeading | ( | uint32_t | index | ) | const |
Query whether the entity will rotate to the track heading.
index | The index of the symbol. |
TSLTrackSymbol::SelectionBehaviour TSLTrackPointSymbol::selectionBehaviour | ( | ) | const |
Query the selection symbol.
const TSLTrackSymbol * TSLTrackPointSymbol::selectionSymbol | ( | ) | const |
This object is owned by the TSLTrackPointSymbol, and must not be modified.
void TSLTrackPointSymbol::selectionSymbol | ( | TSLTrackSymbol * | symbol, |
TSLTrackSymbol::SelectionBehaviour | additional | ||
) |
Set the selection symbol.
symbol | The TSLTrackSymbol to display. |
behaviour | Specifies how the selection symbol should be displayed. |
void TSLTrackPointSymbol::setHeadingIndicatorOrigin | ( | double | offsetX, |
double | offsetY, | ||
TSLDimensionUnits | offsetUnit | ||
) |
Set the origin for the heading indicator
This is specified as an offset from the track's position. When an offset is set a line will be drawn from the track's position to the heading indicator's origin The heading indicator will then be drawn from the origin based on the track's heading/other indicator parameters
offsetX | The origin offset x |
offsetY | The origin offset Y |
offsetUnits | The units of the origin |
void TSLTrackPointSymbol::setHeadingRendering | ( | const TSLRenderingAttributes & | rendering | ) |
Set the rendering attributes used when drawing the heading indicator.
The heading indicator will be drawn as polyline, polygons, or both depending on:
Applications should provide rendering attributes for both polylines and polygons.
rendering | The rendering attributes to use for drawing the heading indicator. |
|
virtual |
Query the type of this symbol.
Implements TSLTrackSymbol.
void TSLTrackPointSymbol::updateSymbolEntity | ( | uint32_t | index, |
const TSLEntity * | entity, | ||
bool | rotateToTrackHeading | ||
) |
Update symbol entity in the parent point symbol.
The provided entity will be cloned, so the application retains ownership of this entity.
index | The index of the symbol. |
entity | The TSLEntity to use as a replacement |
rotateToTrackHeading | If true entity will rotate to the track heading. |