Class

# MapRoute

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Information about a route between two locations.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                        | Type                                               | Read-Only | Shared |
|---------------------------------------------|----------------------------------------------------|-----------|--------|
| `DistanceMeters<maproute.distancemeters>`   | `Double</api/data_types/double>`                   |           |        |
| `DurationSeconds<maproute.durationseconds>` | `Double</api/data_types/double>`                   |           |        |
| `GeoJSON<maproute.geojson>`                 | `JSONItem</api/text/json/jsonitem>`                |           |        |
| `TransportType<maproute.transporttype>`     | `MapRoute.TransportTypes<maproute.transporttypes>` |           |        |

## Enumerations

<div id="maproute.transporttypes">

<div class="rst-class">

forsearch

</div>

</div>

MapRoute.TransportTypes

### TransportTypes

> The various ways one can move between locations.
>
> | Name    |
> |---------|
> | Car     |
> | Bike    |
> | Walking |
> | Transit |

## Property descriptions

<div id="maproute.distancemeters">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MapRoute.DistanceMeters

**DistanceMeters** As `Double</api/data_types/double>`

> The distance in meters between the start and end of the route.

<div id="maproute.durationseconds">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MapRoute.DurationSeconds

**DurationSeconds** As `Double</api/data_types/double>`

> The estimated time required to travel between the starting and ending locations.

<div id="maproute.geojson">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MapRoute.GeoJSON

**GeoJSON** As `JSONItem</api/text/json/jsonitem>`

> The `route</api/user_interface/maps/maproute>` locations in JSON format.
>
> If you store this data, you can then later assign it to this property to recreate the route without having to make another routing request.

<div id="maproute.transporttype">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

MapRoute.TransportType

**TransportType** As `MapRoute.TransportTypes<maproute.transporttypes>`

The method of transport to be used to move between the two locations.

## Compatibility

|                       |                            |
|-----------------------|----------------------------|
| **Project Types**     | Mobile, Web                |
| **Operating Systems** | iOS, Linux, macOS, Windows |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class, `MobileMapViewer</api/user_interface/mobile/mobilemapviewer>`, `WebMapViewer</api/user_interface/web/webmapviewer>`

</div>
