TTMapRoute
@interface TTMapRoute : NSObject
Base class defining route that can be added to the map.
-
Current route style
Declaration
Objective-C
@property (readonly, strong, nonatomic) 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 (readwrite, strong, nonatomic) 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
-
05.12.2018 Determines which style load present route.
Declaration
Objective-C
@property (getter=isActive, assign, readwrite, nonatomic) BOOL active;
Swift
var isActive: Bool { get set }
-
05.12.2018 This method is deprecated, use routeWithCoordinates:count:withRouteStyle:imageStart:imageEnd instead.
Declaration
Objective-C
+ (TTMapRoute *_Nonnull)routeWithCoordinates: (CLLocationCoordinate2D *_Nonnull)coordinates count:(NSUInteger)count imageStart:(id)imageStart imageEnd:(id)imageEnd;
Swift
/*not inherited*/ init(coordinates: UnsafeMutablePointer<CLLocationCoordinate2D>, count: UInt, imageStart: Any!, imageEnd: Any!)
-
05.12.2018 This method is deprecated, use routeWithCoordinatesData:withRouteStyle:imageStart:imageEnd instead.
Declaration
Objective-C
+ (TTMapRoute *_Nonnull)routeWithCoordinatesData:(id _Nonnull)coordinatesData imageStart:(id)imageStart imageEnd:(id)imageEnd;
Swift
/*not inherited*/ init(coordinatesData: Any, imageStart: Any!, imageEnd: Any!)