TTMapRouteStyleBuilder

Objective-C

@interface TTMapRouteStyleBuilder : NSObject

Swift

class TTMapRouteStyleBuilder : NSObject

TTMapRouteStyleBuilder

  • Default active style. Blue line with dark blue outline.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withWidth:(CGFloat)width;

    Swift

    func withWidth(_ width: CGFloat) -> TTMapRouteStyleBuilder

    Parameters

    width

    CGFloat

    Return Value

    TTMapRouteStyleBuilder

  • Fill color.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withFillColor:(id)fillColor;

    Swift

    func withFillColor(_ fillColor: Any!) -> TTMapRouteStyleBuilder

    Parameters

    fillColor

    UIColor

    Return Value

    TTMapRouteStyleBuilder

  • Outline color.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withOutlineColor:(id)outlineColor;

    Swift

    func withOutlineColor(_ outlineColor: Any!) -> TTMapRouteStyleBuilder

    Parameters

    outlineColor

    UIColor

    Return Value

    TTMapRouteStyleBuilder

  • Sets the lengths of the alternating dashes and gaps. The lengths are later scaled by the line width.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withDashArray:
        (NSArray<NSNumber *> *_Nonnull)dashArray;

    Swift

    func withDashArray(_ dashArray: [NSNumber]) -> TTMapRouteStyleBuilder

    Parameters

    dashArray

    dashes and gaps lengths.

    Return Value

    TTMapRouteStyleBuilder

  • Sets the display of line endings.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withLineCapType:(TTLineCapType)capType;

    Swift

    func withLineCapType(_ capType: TTLineCapType) -> TTMapRouteStyleBuilder

    Parameters

    capType

    enumeration of TTLineCapType

    Return Value

    TTMapRouteStyleBuilder

  • Sets the display of lines when joining.

    Declaration

    Objective-C

    - (TTMapRouteStyleBuilder *_Nonnull)withLineJoinType:(TTLineJoinType)joinType;

    Swift

    func withLineJoinType(_ joinType: TTLineJoinType) -> TTMapRouteStyleBuilder

    Parameters

    joinType

    object of TTLineJoinType

    Return Value

    TTMapRouteStyleBuilder

  • Creates instance of TTMapRouteStyle

    Declaration

    Objective-C

    - (TTMapRouteStyle *_Nonnull)build;

    Swift

    func build() -> TTMapRouteStyle

    Return Value

    TTMapRouteStyle