TTMapRoute
Objective-C
@interface TTMapRoute : NSObject
Swift
class TTMapRoute : NSObject
Base class defining route that can be added to the map.
-
Current route style
Declaration
Objective-C
@property (nonatomic, strong, readonly) TTMapRouteStyle *_Nonnull routeStyle;
Swift
var routeStyle: TTMapRouteStyle { get }
-
This property can be used to associate any kind of data with a route.
Declaration
Objective-C
@property (nonatomic, strong) NSObject *_Nullable extraData;
Swift
var extraData: NSObject? { get set }
-
The method adds additional coordinates to define the geometry for the route.
Declaration
Objective-C
- (void)addCoordinates:(CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count withRouteStyle:(TTMapRouteStyle *_Nonnull)routeStyle;
Swift
func addCoordinates(_ coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt, with routeStyle: TTMapRouteStyle)
Parameters
coordinates
coorindates route.
count
count of coordiantes
routeStyle
TTMapRouteStyle style for route.
-
Count for segments of route
Declaration
Objective-C
- (NSInteger)segmentCount;
Swift
func segmentCount() -> Int
Return Value
NSInteger
-
The style assigned to the route.
Declaration
Objective-C
- (TTMapRouteStyle *_Nonnull)routeStyleForSegment:(NSInteger)segmentIndex;
Swift
func routeStyle(forSegment segmentIndex: Int) -> TTMapRouteStyle
Parameters
segmentIndex
segmentIndex
Return Value
TTMapRouteStyle object for Segment;
-
Returns default icon for route departure
Declaration
Objective-C
+ (id)defaultImageDeparture;
Swift
class func defaultImageDeparture() -> Any!
Return Value
UIImage
-
Returns default icon for route destination
Declaration
Objective-C
+ (id)defaultImageDestination;
Swift
class func defaultImageDestination() -> Any!
Return Value
UIImage