OYMRoute Class Reference

Inherits from NSObject
Conforms to OYMJsonProtocol
Declared in OYMRoute.h
OYMRoute.m

Overview

This class includes the resulting route.

Other Methods

  route

List of OYMRoutePoint containing the route

@property (readonly) NSArray *route

Declared In

OYMRoute.h

  instructions

List of OYMInstruction to follow

@property (readonly) NSArray *instructions

Declared In

OYMRoute.h

  distance

Route distance in meters

@property (readonly) NSNumber *distance

Declared In

OYMRoute.h

  time

Route time in seconds

@property (readonly) NSNumber *time

Declared In

OYMRoute.h

  arePropsFulfilled

Flag telling whether the properties are fulfilled to compute the route

@property (readonly) BOOL arePropsFulfilled

Declared In

OYMRoute.h

– initWithRoute:andInstructions:andDistance:andTime:andProps:

Route constructor.

- (instancetype)initWithRoute:(NSArray *)r andInstructions:(NSArray *)i andDistance:(NSNumber *)d andTime:(NSNumber *)t andProps:(BOOL)props

Parameters

r

List of OYMRoutePoint containing the list

i

List of OYMInstruction

d

Route distance [meters]

t

Route time [seconds]

Declared In

OYMRoute.h

– getRouteInstructionForLocation:

This method returns the next instruction to be shown according to the user position.

- (OYMInstruction *)getRouteInstructionForLocation:(OYMLocationResult *)loc

Parameters

loc

Current user position

Return Value

The next instruction to be shown, nil if not available

Declared In

OYMRoute.h

– getProjectedPointForLocation:

This method returns the projection of the user position to the route.

- (OYMRouteProjectedPoint *)getProjectedPointForLocation:(OYMLocationResult *)loc

Parameters

loc

Current user position

Return Value

The projected point into the route

Declared In

OYMRoute.h

– getProjectionForLocation:

This method returns a RoutingResult object to be used.

- (OYMRoutingResult *)getProjectionForLocation:(OYMLocationResult *)loc

Parameters

loc

Current user position

Return Value

An object including all the relevant information

Declared In

OYMRoute.h

– logString

This metod returns a loggable representation of the route.

- (NSString *)logString

Return Value

JSON containing the required info to recreate the route

Declared In

OYMRoute.h

Other Methods

– initWithJson:

This method is currently not supported.

- (instancetype)initWithJson:(NSString *)json

Declared In

OYMRoute.m