TTTrackingManager
Objective-C
@protocol TTTrackingManager <NSObject>
Swift
protocol TTTrackingManager : NSObjectProtocol
TTTrackingManager class to manage interactions with tracking objects on map.
-
The property indicates whether the user’s position is actually on the map. Setting this property will update the view of the current position visible on the map.
Declaration
Objective-C
@property (nonatomic, strong) TTTrackingObject *_Nonnull currentPosition;
Swift
var currentPosition: TTTrackingObject { get set }
-
Add tracking object to the map.
Declaration
Objective-C
- (void)addTrackingObject:(TTTrackingObject *_Nonnull)trackingObject;
Swift
func add(_ trackingObject: TTTrackingObject)
Parameters
trackingObject
trackingObject
-
Remove tracking object from the map.
Declaration
Objective-C
- (void)removeTrackingObject:(TTTrackingObject *_Nonnull)trackingObject;
Swift
func remove(_ trackingObject: TTTrackingObject)
Parameters
trackingObject
trackingObject
-
Start tracking the specific object. In the tracking mode, rotate and pan gestures are blocked. The user can change only zoom level, map camera is automatically adjusted to follow the tracking object.
Declaration
Objective-C
- (void)startTrackingObject:(TTTrackingObject *_Nonnull)trackingObject;
Swift
func start(_ trackingObject: TTTrackingObject)
Parameters
trackingObject
trackingObject
-
Stop tracking object, all gestures are enabled again.
Declaration
Objective-C
- (void)stopTrackingObject:(TTTrackingObject *_Nonnull)trackingObject;
Swift
func stop(_ trackingObject: TTTrackingObject)
Parameters
trackingObject
tracking object
-
Update position of tracking object.
Declaration
Objective-C
- (void)updateTrackingObject:(TTTrackingObject *_Nonnull)trackingObject withTTLocation:(id)location;
Swift
func update(_ trackingObject: TTTrackingObject, withTTLocation location: Any!)
Parameters
trackingObject
Tracking Object
location
TTLocation object
-
Enable low-pass filtering so that the camera can follow the chevron in a more smoother way.
Declaration
Objective-C
- (void)setBearingSmoothingFilter:(unsigned int)smoothFactor;
Swift
func setBearingSmoothingFilter(_ smoothFactor: UInt32)
Parameters
smoothFactor
smooth Factor - describes the strength of smoothing
-
Sets the tracking screen coordinates to a given point.
Declaration
Objective-C
- (void)setTrackingScreenCoordinates:(CGPoint)point;
Swift
func setTrackingScreenCoordinates(_ point: CGPoint)
Parameters
point
The point that will be used to center the tracking object.
-
The default tracking object that describes the current position on the map.
Declaration
Objective-C
+ (TTTrackingObject *_Nonnull)defaultCurrentPosition;
Swift
static func defaultCurrentPosition() -> TTTrackingObject
Return Value
TTTrackingObject.