SITRoute Class Reference

Inherits from NSObject
Declared in SITRoute.h

Overview

Route between two points. From and destination must be inside the same building.

  origin

The initial point of the route.

@property (nonatomic, readonly) SITPoint *origin

Declared In

SITRoute.h

  destination

The destination point of the route.

@property (nonatomic, readonly) SITPoint *destination

Declared In

SITRoute.h

  options

Parameters associated with the request. Use accessible key to see if the route has been

@property (nonatomic, readonly) NSDictionary *options

Declared In

SITRoute.h

  routeSteps

Steps of the route to arrive from origin to destination.

@property (nonatomic, strong, readonly) NSArray *routeSteps

Declared In

SITRoute.h

  indications

Indications to follow.

@property (nonatomic, strong, readonly) NSArray *indications

Declared In

SITRoute.h

  points

Returns list of ordered points of the route.

@property (nonatomic, strong, readonly, nonnull) NSArray<SITPoint*> *points

Declared In

SITRoute.h

– initWithOrigin:destination:routeSteps:indications:distance:options:

Constructor.

- (instancetype)initWithOrigin:(SITPoint *)origin destination:(SITPoint *)destination routeSteps:(NSArray *)routeSteps indications:(NSArray *)indications distance:(float)distance options:(NSDictionary *)options

Parameters

origin

from point.

destination

destination point.

routeSteps

steps to arrive from origin to destination.

indications

indications the user should follow to arrive from origin to destination.

distance

distance of the whole route

options

additional information of the route.

Return Value

initialized object.

Discussion

You should not use this method. Instead you should user the route objects provided by SITDirectionsManager.

Declared In

SITRoute.h

– indicationForStep:

Retrieve the indication for a particular step of the route.

- (SITIndication *)indicationForStep:(SITRouteStep *)step

Parameters

step

step inside the route

Return Value

indication associated with the step (if valid step).

Declared In

SITRoute.h

– indicationForNextStep:

Retrieve the next indication for a particular step of the route.

- (SITIndication *)indicationForNextStep:(SITRouteStep *)step

Parameters

step

step inside the route

Return Value

next indication associated with the step (if valid step).

Declared In

SITRoute.h

– distance

Complete distance of the route.

- (float)distance

Return Value

distance of the route (meters).

Declared In

SITRoute.h

– timeToGoal

Estimated time of the route.

- (float)timeToGoal

Return Value

time to the goal (seconds)

Declared In

SITRoute.h

– segments

Return list of ordered points split by floor, each list contains points from one floor, but can have multiple lists of the same floor. Use this method to display segments in a map, each list should be a polyline. For example, if there is no path to go to the other side of the same floor and you need to go up one floor and then go down again to the original floor, this method will return one segment on the current floor, one segment on the upper floor and one more segment in the current floor. Drawing example: if you want to draw all the points of a floor, you should draw a polyline for each list that contains the floor you want to show.

- (nonnull NSArray<SITRouteSegment*> *)segments

Return Value

Return list of ordered points split by floor.

Declared In

SITRoute.h