![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A track graphic, for use with the TSLTrackDisplayManager
A track graphic is an object displayed by the track manager which may interact with fixed locations or tracks within the manager. Typically these may be used to draw links between tracks, or other geometry which interacts with a track.
A track graphic's coordinates are provided as 'control points'
If a control point is attached to a track the position of that point will automatically update whenever the track moves.
If the track is subsequently removed from the TSLTrackDisplayManager it will remain attached to the graphic. If the application no longer has a handle to the track it will remain in memory until the graphic is deleted, and the corresponding point of the graphic will no longer update.
This class is reference counted internally to allow objects to be shared within the track manager SDK
Public Types | |
enum | ControlPointType { LatLonControlPoint , TrackControlPoint } |
The control point types supported by track graphics. More... | |
enum | GraphicType { TrackGraphicLink , TrackGraphicArrow , TrackGraphicRuler } |
The types of graphic provided by the MapLink Track Manager SDK. More... | |
Public Member Functions | |
TSLTrackGraphic::GraphicType | type () const |
void | release () |
void | featureID (TSLFeatureID featureID) |
TSLFeatureID | featureID () const |
bool | featureName (const char *featureName) |
void | userID (uint32_t id) |
uint32_t | userID () const |
TSLTrack::TrackID | graphicID () const |
bool | addControlPoint (double lat, double lon) |
bool | addControlPoint (TSLTrack *track) |
bool | getControlPointLocation (uint32_t index, double &lat, double &lon) const |
TSLTrack * | getControlPointTrack (uint32_t index) const |
TSLTrackGraphic::ControlPointType | controlPointType (uint32_t index) const |
bool | removeControlPoint (uint32_t index) |
uint32_t | numControlPoints () const |
bool | insertControlPoint (uint32_t index, double lat, double lon) |
bool | insertControlPoint (uint32_t index, TSLTrack *track) |
bool | moveControlPoint (uint32_t index, double lat, double lon) |
Protected Member Functions | |
TSLTrackGraphic () | |
TSLTrackGraphic (const TSLTrackGraphic &other) | |
virtual | ~TSLTrackGraphic () |
void | operator delete (void *ptr) |
|
protected |
|
protected |
|
protectedvirtual |
bool TSLTrackGraphic::addControlPoint | ( | double | lat, |
double | lon ) |
Add a control point as a fixed location in latitude/longitude
All latitude and longitude values provided to the Track Manager SDK must be in the WGS84 datum.
lat | The latitude of the control point |
lon | The longitude of the control point |
bool TSLTrackGraphic::addControlPoint | ( | TSLTrack * | track | ) |
Add a control point attached to a track
When the track is moved on the display the track graphic will automatically be updated
track | The track to use as the control point |
TSLTrackGraphic::ControlPointType TSLTrackGraphic::controlPointType | ( | uint32_t | index | ) | const |
Query the type of a control point
index | The index of the control point to query |
TSLFeatureID TSLTrackGraphic::featureID | ( | ) | const |
Get the feature ID of the graphic
void TSLTrackGraphic::featureID | ( | TSLFeatureID | featureID | ) |
Sets the feature type for the track by ID.
Features must first be created on the data layer for the TSLTrackDisplayManager that this track is in.
Setting a feature type on the track allows it to be decluttered
featureID | The feature ID of the graphic |
bool TSLTrackGraphic::featureName | ( | const char * | featureName | ) |
Sets the feature type for the graphic by name.
Features must first be created on the data layer for the TSLTrackDisplayManager that this track is in.
featureName | The feature name for the graphic |
bool TSLTrackGraphic::getControlPointLocation | ( | uint32_t | index, |
double & | lat, | ||
double & | lon ) const |
Query the location of a control point
If the control point is attached to a track the current display position of the track will be returned. The returned latitude and longitude values will be in the WGS84 datum.
index | The index of the control point to query |
lat | Will be set to the latitude of the control point |
lon | Will be set to the longitude of the control point |
TSLTrack * TSLTrackGraphic::getControlPointTrack | ( | uint32_t | index | ) | const |
Query the track attached to a control point
If the control point is a fixed location NULL will be returned
index | The index of the control point to query |
TSLTrack::TrackID TSLTrackGraphic::graphicID | ( | ) | const |
Query the ID allocated for this track
This ID is assigned when the graphic is added to a TSLTrackDisplayManager This ID will be unique, and will not be shared with any other track or graphic within the TSLTrackDisplayManager.
bool TSLTrackGraphic::insertControlPoint | ( | uint32_t | index, |
double | lat, | ||
double | lon ) |
Insert a control point as a fixed location in latitude/longitude.
All latitude and longitude values provided to the Track Manager SDK must be in the WGS84 datum.
index | The index in the control point list to insert at. |
lat | The latitude of the control point. |
lon | The longitude of the control point. |
bool TSLTrackGraphic::insertControlPoint | ( | uint32_t | index, |
TSLTrack * | track ) |
Insert a control point attached to a track.
When the track is moved on the display the track graphic will automatically be updated.
index | The index in the control point list to insert at. |
track | The track to use as the control point. |
bool TSLTrackGraphic::moveControlPoint | ( | uint32_t | index, |
double | lat, | ||
double | lon ) |
Move a control point.
This method will return false if the requested control point is attached to a track or other moving object.
All latitude and longitude values provided to the Track Manager SDK must be in the WGS84 datum.
index | The index of the control point to move. |
lat | The new latitude of the control point. |
long | The new longitude of the control point. |
uint32_t TSLTrackGraphic::numControlPoints | ( | ) | const |
Query the number of control points defined for the graphic
|
protected |
void TSLTrackGraphic::release | ( | ) |
Release ownership of this object
The object will be deleted once the application has called release and any references held by MapLink have been released
bool TSLTrackGraphic::removeControlPoint | ( | uint32_t | index | ) |
Remove a control point
index | The index of the control point to remove |
TSLTrackGraphic::GraphicType TSLTrackGraphic::type | ( | ) | const |
Query the type of the track graphic
uint32_t TSLTrackGraphic::userID | ( | ) | const |
Query the user ID of the graphic
void TSLTrackGraphic::userID | ( | uint32_t | id | ) |
Set the user ID of this graphic
This ID is provided for use by an application, and is unrelated to the TrackID used by the TSLTrackDisplayManager.
id | The user ID to assign to this graphic. |