GooglePlaces Framework Reference

GMSPlaceRoutingPreference

enum GMSPlaceRoutingPreference : NSInteger {}

A set of values that specify factors to take into consideration when calculating the routes.

  • No routing preference specified. Default to TrafficUnaware.

    Declaration

    Swift

    case unspecified = 0

    Objective-C

    GMSPlaceRoutingPreferenceUnspecified
  • Computes routes without taking live traffic conditions into consideration.

    Suitable when traffic conditions don’t matter or are not applicable. Using this value produces the lowest latency.

    Important note when using the DRIVE and TWO_WHEELER travel modes that are specified in {@link GMSPlaceTravelMode}. The route and duration chosen are based on road network and average time-independent traffic conditions, not current road conditions. Consequently, routes may include roads that are temporarily closed. Results for a given request may vary over time due to changes in the road network, updated average traffic conditions, and the distributed nature of the service. Results may also vary between nearly-equivalent routes at any time or frequency.

    Declaration

    Swift

    case trafficUnaware = 1

    Objective-C

    GMSPlaceRoutingPreferenceTrafficUnaware
  • Calculates routes taking live traffic conditions into consideration. In contrast to TrafficAwareOptimal, some optimizations are applied to significantly reduce latency.

    Declaration

    Swift

    case trafficAware = 2

    Objective-C

    GMSPlaceRoutingPreferenceTrafficAware
  • Calculates the routes taking live traffic conditions into consideration, without applying most performance optimizations. Using this value produces the highest latency.

    Declaration

    Swift

    case trafficAwareOptimal = 3

    Objective-C

    GMSPlaceRoutingPreferenceTrafficAwareOptimal