> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/radarlabs/radar-sdk-ios/llms.txt
> Use this file to discover all available pages before exploring further.

# RadarRoutes

> Container for routes in different travel modes

`RadarRoutes` represents routes from an origin to a destination across different travel modes, including foot, bike, car, truck, and motorbike.

## Properties

<ResponseField name="geodesic" type="RadarRouteDistance">
  The geodesic distance between the origin and destination. This is the shortest distance between two points on the surface of a sphere (straight-line distance).
</ResponseField>

<ResponseField name="foot" type="RadarRoute">
  The route by foot between the origin and destination. May be `nil` if mode not specified or route unavailable.

  <Expandable title="properties">
    <ResponseField name="distance" type="RadarRouteDistance" required>
      The distance of the route.
    </ResponseField>

    <ResponseField name="duration" type="RadarRouteDuration" required>
      The duration of the route.
    </ResponseField>

    <ResponseField name="geometry" type="RadarRouteGeometry" required>
      The geometry of the route.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="bike" type="RadarRoute">
  The route by bike between the origin and destination. May be `nil` if mode not specified or route unavailable.

  <Expandable title="properties">
    <ResponseField name="distance" type="RadarRouteDistance" required>
      The distance of the route.
    </ResponseField>

    <ResponseField name="duration" type="RadarRouteDuration" required>
      The duration of the route.
    </ResponseField>

    <ResponseField name="geometry" type="RadarRouteGeometry" required>
      The geometry of the route.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="car" type="RadarRoute">
  The route by car between the origin and destination. May be `nil` if mode not specified or route unavailable.

  <Expandable title="properties">
    <ResponseField name="distance" type="RadarRouteDistance" required>
      The distance of the route.
    </ResponseField>

    <ResponseField name="duration" type="RadarRouteDuration" required>
      The duration of the route.
    </ResponseField>

    <ResponseField name="geometry" type="RadarRouteGeometry" required>
      The geometry of the route.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="truck" type="RadarRoute">
  The route by truck between the origin and destination. May be `nil` if mode not specified or route unavailable.

  <Expandable title="properties">
    <ResponseField name="distance" type="RadarRouteDistance" required>
      The distance of the route.
    </ResponseField>

    <ResponseField name="duration" type="RadarRouteDuration" required>
      The duration of the route.
    </ResponseField>

    <ResponseField name="geometry" type="RadarRouteGeometry" required>
      The geometry of the route.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="motorbike" type="RadarRoute">
  The route by motorbike between the origin and destination. May be `nil` if mode not specified or route unavailable.

  <Expandable title="properties">
    <ResponseField name="distance" type="RadarRouteDistance" required>
      The distance of the route.
    </ResponseField>

    <ResponseField name="duration" type="RadarRouteDuration" required>
      The duration of the route.
    </ResponseField>

    <ResponseField name="geometry" type="RadarRouteGeometry" required>
      The geometry of the route.
    </ResponseField>
  </Expandable>
</ResponseField>

## Instance Methods

### dictionaryValue

```swift theme={null}
func dictionaryValue() -> [String: Any]
```

```objective-c theme={null}
- (NSDictionary *_Nonnull)dictionaryValue;
```

Converts the routes to a dictionary representation.

#### Returns

A dictionary representation of the routes.

## Example

```swift theme={null}
// Get routing information for multiple modes
Radar.getDistance(
    origin: origin,
    destination: destination,
    modes: [.car, .bike, .foot],
    units: .imperial
) { (status, routes) in
    if let routes = routes {
        // Check geodesic distance
        if let geodesic = routes.geodesic {
            print("Straight-line distance: \(geodesic.text)")
        }
        
        // Check car route
        if let car = routes.car {
            print("Car: \(car.distance.text), \(car.duration.text)")
        }
        
        // Check bike route
        if let bike = routes.bike {
            print("Bike: \(bike.distance.text), \(bike.duration.text)")
        }
        
        // Check walking route
        if let foot = routes.foot {
            print("Walking: \(foot.distance.text), \(foot.duration.text)")
        }
    }
}
```

```objective-c theme={null}
// Get routing information for multiple modes
[Radar getDistanceFromOrigin:origin
                  destination:destination
                        modes:RadarRouteModeCar | RadarRouteModeBike | RadarRouteModeFoot
                        units:RadarRouteUnitsImperial
            completionHandler:^(RadarStatus status, RadarRoutes * _Nullable routes) {
    if (routes) {
        // Check geodesic distance
        if (routes.geodesic) {
            NSLog(@"Straight-line distance: %@", routes.geodesic.text);
        }
        
        // Check car route
        if (routes.car) {
            NSLog(@"Car: %@, %@", routes.car.distance.text, routes.car.duration.text);
        }
        
        // Check bike route
        if (routes.bike) {
            NSLog(@"Bike: %@, %@", routes.bike.distance.text, routes.bike.duration.text);
        }
        
        // Check walking route
        if (routes.foot) {
            NSLog(@"Walking: %@, %@", routes.foot.distance.text, routes.foot.duration.text);
        }
    }
}];
```

## See Also

* [Routing API Documentation](https://radar.com/documentation/api#distance)
* [RadarRoute](/api/radar-route)
* [RadarRouteDistance](/api/radar-route-distance)
* [RadarRouteDuration](/api/radar-route-duration)
* [RadarRouteGeometry](/api/radar-route-geometry)
