AI-generated Key Takeaways
-
GMSNavigationRouteCalloutFormat
controls the display of information (distance or ETA) in route callouts during navigation. -
It offers three options:
default
,time
, anddistance
, allowing developers to customize the callout content. -
The
default
option automatically chooses between time and distance based on the selected routing strategy. -
time
displays estimated time to reach the destination, whiledistance
shows the remaining distance.
GMSNavigationRouteCalloutFormat
enum GMSNavigationRouteCalloutFormat : NSInteger {}
The format specifies whether to show distance or ETA information in route callouts.
-
Shows the time or distance, depending on the routing strategy. Shows time with the default best routing strategy and distance with the shorter routing strategy.
Declaration
Swift
case `default` = 0
Objective-C
GMSNavigationRouteCalloutFormatDefault = 0
-
Shows time information in route callouts (e.g., 10 min, 5 min faster).
Declaration
Swift
case time = 1
Objective-C
GMSNavigationRouteCalloutFormatTime
-
Shows distance information in route callouts (e.g., 10 km, 5 km longer).
Declaration
Swift
case distance = 2
Objective-C
GMSNavigationRouteCalloutFormatDistance