Structure

Route

Information about a route, including step-by-step instructions, distance, and estimated travel time.

Declaration

dictionary Route {
    [[mapkit.Coordinate]] path;
    mapkit.PolylineOverlay polyline;
    RouteStep[] steps;
    String name;
    Number distance;
    Number expectedTravelTime;
    mapkit.Directions.Transport transportType;
};

Overview

A Route object encapsulates the complete information for a route returned by the server, including geometry that can be used to draw a path and step-by-step text instructions. Route objects can't be instantiated directly; they are returned as part of the DirectionsResponse.

Topics

Route Geometry

polyline

An instance of a polyline overlay that represents the path of a route.

path

An array of coordinate objects representing the path of the route.

Deprecated

Route Details

steps

An array of steps that comprise the overall route.

name

The name assigned to the route.

distance

The route distance in meters.

expectedTravelTime

The expected travel time in seconds.

transportType

The overall route transport type.

mapkit.Directions.Transport

The modes of transportation.

See Also

Getting Directions

route

Retrieves directions and estimated travel time based on the specified start and end points.

DirectionsRequest

The requested start and end points for a route, as well as the planned mode of transportation.

DirectionsResponse

The directions and estimated travel time returned for a route.

RouteStep

A single route between a requested start and end point.