SYRouting Class Reference

Contains classes, protocols, and enumerations for describing and calculating routes. More...

#import <SYRouting.h>

Inheritance diagram for SYRouting:
Collaboration diagram for SYRouting:

Instance Methods

((unavailable("Use static methods without creating and instance.") - __attribute__
 

Class Methods

(nonnull SYTask *) + computeRouteFromJson:progress:completion:
 Method will compute route from json string obtained from [SYRouteQuickInfo serialize]. More...
 
(nonnull SYTask *) + computeRouteForRequest:withAlternatives:completion:
 This method will compute primary route with some optional alternatives. More...
 
(nonnull SYTask *) + computeRouteDurationsForRoute:timesOfStart:completion:
 Method will compute route durations in specified day time based on speed profiles and current traffic. More...
 
(nonnull SYTask *) + computeEVRangeFromPosition:capacities:options:evProfile:completion:
 This method will compute routes in all directions from the position, and returns a polygon of area where you can go with your battery capacity. You can get multiple polygons for different capacities in one call. More...
 
(void) + cancelComputing
 Cancel all computing tasks. More...
 
(nullable NSArray< SYChargingWaypoint * > *) + chargingStationsFromRoute:
 
(double) + getRemainingBatteryCapacityAtWaypoint:profile:route:
 
((unavailable("Use static methods without creating and instance.") + __attribute__
 

Detailed Description

Contains classes, protocols, and enumerations for describing and calculating routes.

Method Documentation

◆ computeRouteFromJson:progress:completion:

+ (nonnull SYTask*) computeRouteFromJson: (nonnull NSString *)  json
progress: (nullable void(^)(float progress))  progress
completion: (nonnull void(^)(SYRoute *_Nullable route, SYRoutingResult status))  completion 

Method will compute route from json string obtained from [SYRouteQuickInfo serialize].

Parameters
jsonNSString object representation.
progressof compute 0-1
completionfinal call with all computed route
Returns
cancelable task

◆ computeRouteForRequest:withAlternatives:completion:

+ (nonnull SYTask*) computeRouteForRequest: (nonnull SYPrimaryRequest *)  primary
withAlternatives: (nullable NSArray< SYAlternativeRequest * > *)  alternatives
completion: (computeRoute(_:alternatives:completion:))  NS_SWIFT_NAME 

This method will compute primary route with some optional alternatives.

Parameters
primarySYPrimaryRequest request for primary route compute.
alternativesoptional array of SYRoutingAlternativeType. SYRoutingAlternativeTypeAvoid may be listed multiple times.
completionfinal call with primary route and all computed alternatives
Returns
cancelable task

◆ computeRouteDurationsForRoute:timesOfStart:completion:

+ (nonnull SYTask*) computeRouteDurationsForRoute: (nonnull SYRoute *)  route
timesOfStart: (nonnull NSArray< NSDate * > *)  times
completion: (nonnull RouteDurationsFinishedBlock)  completion 

Method will compute route durations in specified day time based on speed profiles and current traffic.

Parameters
routeRoute to compute durations on.
timesArray of times.
completiondurations array of durations in NSTimeInterval.
Returns
cancelable task

◆ computeEVRangeFromPosition:capacities:options:evProfile:completion:

+ (nonnull SYTask*) computeEVRangeFromPosition: (nonnull SYGeoCoordinate *)  position
capacities: (nonnull NSArray< NSNumber * > *)  capacities
options: (nullable SYRoutingOptions *)  options
evProfile: (nonnull SYEVProfile *)  profile
completion: (nonnull EVRangeFinishedBlock)  completion 

This method will compute routes in all directions from the position, and returns a polygon of area where you can go with your battery capacity. You can get multiple polygons for different capacities in one call.

Parameters
positionGeographical position from which calculation starts
capacitiesList of battery capacities in kWh as start values for the computation
optionsSYRoutingOptions if needed
profileelectric car profile
completioncallback to recieve polygons, SYRoutingResult with status
Returns
cancelable task

◆ cancelComputing

+ (void) cancelComputing

Cancel all computing tasks.

◆ chargingStationsFromRoute:

+ (nullable NSArray<SYChargingWaypoint*>*) chargingStationsFromRoute: (nonnull SYRoute *)  route
Parameters
routeElectric vehicle route from which to extract stations
Returns
ChargingWaypoins from EV route

◆ getRemainingBatteryCapacityAtWaypoint:profile:route:

+ (double) getRemainingBatteryCapacityAtWaypoint: (nonnull SYWaypoint *)  waypoint
profile: (nonnull SYEVProfile *)  profile
route: (nonnull SYRoute *)  route 
Parameters
waypointon route
profilestarting battery profile
routeelectric vehicle route
Returns
remaining battery capacity (kwh) at given waypoint at route based on starting ev profile

◆ __attribute__ [1/2]

- ((unavailable("Use static methods without creating and instance.") __attribute__

◆ __attribute__ [2/2]

+ ((unavailable("Use static methods without creating and instance.") __attribute__

The documentation for this class was generated from the following file: