Comment on page
Customization
Now, let’s have a walkthrough of the other functionalities that could be performed.
- Custom marker options
What if you want to set your own image, title for marker?
Swift
obj-c
Swift
obj-c
Swift
obj-c
let startTracking = TeliverTracker.init(forTrackingId: "Tracking_Id", withCustomMessage: "Your_marker_Title", andWithCustomMarker: UIImage.init(named: "image")!)
Teliver.startTrackingFor(user: startTracking, withNavigationTitle: "Location Tracking")
TeliverTracker *tracker = [[TeliverTracker alloc]initForTrackingId:@"Tracking_Id" withCustomMessage:@"Tracked" andWithCustomMarker:[UIImage imageNamed:@"image"]];
[Teliver startTrackingForUser:tracker withNavigationTitle:@"Location Tracking"];
let operator1 = TeliverTracker.init(forTrackingId: "Tracking_Id_1")
let operator2 = TeliverTracker.init(forTrackingId: "Tracking_Id_2")
Teliver.startTrackingFor(users: [operator1,operator2])
TeliverTracker *operator1 = [[TeliverTracker alloc]initForTrackingId:@"Tracking_Id_1"]];
TeliverTracker *operator2 = [[TeliverTracker alloc]initForTrackingId:@"Tracking_Id_2"]];
[Teliver startTrackingForUsers:[operator1, operator2];
public func didStartedTracking(_ trackingId: String?){
//This method is called when the operator initiates the trip by startTracking method.
}
public func didStoppedTracking(_ trackingId: String?){
//This method is called when tracking has stopped by calling the method stopTracking.
}
public func didRecieveUpdateOnTracking(_ trackingId: String?, data: [String : Any]){
//This method is called when there is a updates in the location.
}
public func didRecieveErrorOnTracing(_ error: String?){
//This method is called when there is error on tracking.
}
-(void) didStartedTracking:(NSString *)trackingId{
//This method is called when the operator initiates the trip by startTracking method.
}
-(void) didStoppedTracking:(NSString *)trackingId{
//This method is called when tracking has stopped by calling the method stopTracking.
}
-(void) didRecieveUpdateOnTracking:(NSString *)trackingId data:(NSDictionary<NSString *,id> *)data{
//This method is called when there is a updates in the location.
}
-(void) didRecieveErrorOnTracing:(NSString *)error{
//This method is called when there is error on tracking.
}
Note: withNavigationTitle here sets your page title on tracking page
- Multiple Operator Tracking
What if you want to track multiple operators?
Note: Multiple Operator tracking allowed only on paid plans
- Get Location updates
What if you want just the location updates of each operator?
Implement the delegate ‘TeliverTrackingDelegate’ on your view controller and you will get the following methods for usage.
Last modified 3yr ago