GoogleNavigation Framework Reference

GMSNavigationInstructionOptions

@interface GMSNavigationInstructionOptions : NSObject

Options for formatting attributed instruction strings.

  • Image options to be used when generating inline images. Setting this to nil specifies using a default set of image options.

    Declaration

    Swift

    @NSCopying var imageOptions: GMSNavigationStepInfoImageOptions! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) GMSNavigationStepInfoImageOptions *imageOptions;
  • By default, instructions will sometimes use a special format for long-distance instructions, such as staying on the same highway for a long time. Setting this to YES will disable the use of such instructions. This can be an overall better experience on space-constrained displays such as CarPlay.

    Defaults to NO.

    Declaration

    Swift

    var disableLongDistanceFormat: Bool { get set }

    Objective-C

    @property (nonatomic) BOOL disableLongDistanceFormat;
  • The primary font to use when formatting the instructions.

    Setting this to nil implies use of the default font from the Google navigation experience.

    Declaration

    Swift

    @NSCopying var primaryFont: UIFont! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) UIFont *primaryFont;
  • The secondary font to use when formatting the instructions.

    Setting this to nil implies use of the default font from the Google navigation experience.

    Declaration

    Swift

    @NSCopying var secondaryFont: UIFont! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) UIFont *secondaryFont;
  • The font for small elements like exit numbers or conjunctions.

    Setting this to nil implies use of the default font from the Google navigation experience.

    Declaration

    Swift

    @NSCopying var tertiaryFont: UIFont! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) UIFont *tertiaryFont;
  • The color to use for instruction text.

    Setting this to nil implies white.

    Declaration

    Swift

    @NSCopying var textColor: UIColor! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) UIColor *textColor;
  • The primary road shield height to assign when formatting the instructions.

    Road shields are the logos for particular highways or other roads. They may be used inline in the attributed instructions in order to more compactly reference a road. This value controls the height assigned to such road shields.

    Declaration

    Swift

    var primaryRoadShieldHeight: CGFloat { get set }

    Objective-C

    @property (nonatomic) CGFloat primaryRoadShieldHeight;
  • The secondary road shield height to assign when formatting the instructions.

    See primaryRoadShieldHeight for a description of road shields.

    Declaration

    Swift

    var secondaryRoadShieldHeight: CGFloat { get set }

    Objective-C

    @property (nonatomic) CGFloat secondaryRoadShieldHeight;
  • The width of the outline drawn around road shields.

    By default, the width is 0, which will cause no outline to be drawn.

    See primaryRoadShieldHeight for a description of road shields.

    Declaration

    Swift

    var roadShieldOutlineWidth: CGFloat { get set }

    Objective-C

    @property (nonatomic) CGFloat roadShieldOutlineWidth;
  • The color of the outline drawn around road shields.

    By default, the color is nil, which will cause no outline to be drawn.

    See primaryRoadShieldHeight for a description of road shields.

    Declaration

    Swift

    var roadShieldOutlineColor: UIColor? { get set }

    Objective-C

    @property (nonatomic, nullable) UIColor *roadShieldOutlineColor;
  • The exit cue height to use when formatting the instructions.

    When exiting a highway or other limited access road, instructions may reference specific exit numbers in some situations. When this is done, a graphic highlighting the exit number may be created. This property allows controlling the height of that graphic.

    Declaration

    Swift

    var exitNumberHeight: CGFloat { get set }

    Objective-C

    @property (nonatomic) CGFloat exitNumberHeight;
  • The exit cue background color to assign when formatting the instructions.

    When exiting a highway or other limited access road, instructions may reference specific exit numbers in some situations. When this is done, a background color may be assigned to the graphic highlighting the exit number. This property allows controlling that color.

    Setting this to nil implies use of the default color from the Google navigation experience.

    Declaration

    Swift

    @NSCopying var exitCueBackgroundColor: UIColor! { get set }

    Objective-C

    @property (nonatomic, copy, null_resettable) UIColor *exitCueBackgroundColor;