Route | iOS SDK | 2GIS Documentation


A class describing a route. A route is a set of attributes, each of which is a container of type RouteAttribute or RouteLongAttribute, in which route attribute elements are stored. Route attributes are divided into point attributes and long attributes. Point attributes (e.g., geometry points or lying cops) are specified as a pair of RoutePoints and attribute values. Extended attributes (such as roadway widths or speed limits) are specified as a pair from RoutePoint that indicates the start of the attribute and the attribute value. A terminator is placed at the end of the route. For example, let the width of the roadway be specified as a set of pairs {{0m, 3m}, {10m, 7m}, {20m, 5m}, {30m, 0m}}, then the first 10 meters of the route is 3 meters wide, at the interval [10m, 20m) - 7m, from 20m to the end of the route - 5m.

Extends: Hashable
public static func == (lhs: Route, rhs: Route) -> Bool

Returns a Boolean value indicating whether two values are equal.


Route geometry.

The instructions that must be followed to move along the route.

Intermediate points of a route. The route may not pass directly through an intermediate point, but next to it. The attribute value stores the coordinate where the intermediate point was set, the key stores the coordinate of the projection of the intermediate point on the route.

Elevations on the route.

Bad road (there are bumps and potholes on the road that prevent passage).

Obstacles on a route.

Road/street names.

An indication that a section of the route passes through a populated area.

Mode of transport for which a section of the route is built.

Road cameras.

Width of the roadway in meters. 0 - width unknown.

Artificial bumps.

Maximum permissible speed limits.

Additional description to the type of road on which the route runs.

Type of road the route takes.

Sections of the route on toll roads.

Indication of the presence or absence of data for freight navigation.

Passing zones for trucks.

Indication of the validity of the no-traffic sign.

An indication of a sign prohibiting the passage of any motor vehicle (overlap).

Description of how to travel by public transport between transfer points.