HERE iOS SDK Developer's Guide

Scooter Routing

Scooter routing provides route calculation using car roads with scooter-specific speed estimations. This type of routing can be performed online or offline.

Note:
  • Scooter routing is currently offered as a beta feature. APIs may change without notice. Please contact us if you plan to use this feature in a commercial application.
  • Scooter-specific roadways are not yet supported.
Figure 1. Scooter Route

Scooter routing includes car-only roads. Since scooters are not permitted on highways, highways are avoided for this type of route calculation. In cases when forbidden, car-specific roads or highways cannot be avoided, the scooter routing computation fails.

Note: Scooter routing only supports fastest routes.

This feature supports the speed limitation for scooters, which is 45 km/h. Calculated routes take into account the fact that the possible travel speed for scooters is slower than car travel, such as on roads where car travel speed is greater than 45 km/h. In addition, heavy traffic affects scooter travel time less than car travel time.

To calculate a scooter route, use similar steps as for other transport mode types, such as the following example:

// Create an NMACoreRouter.
NMACoreRouter* coreRouter = [[NMACoreRouter alloc] init];
NMAGeoCoordinates* geoCoord1 =
  [[NMAGeoCoordinates alloc] initWithLatitude:49.276271 longitude:-123.113224];
NMAGeoCoordinates* geoCoord2 =
  [[NMAGeoCoordinates alloc] initWithLatitude:49.1947289 longitude:-123.1762924];
NMAWaypoint* waypoint1 = [[NMAWaypoint alloc] initWithGeoCoordinates:geoCoord1];
NMAWaypoint* waypoint2 = [[NMAWaypoint alloc] initWithGeoCoordinates:geoCoord2];
NSMutableArray* stops = [[NSMutableArray alloc] initWithCapacity:4];
[stops addObject:waypoint1];
[stops addObject:waypoint2];

NMARoutingMode* routingMode = [[NMARoutingMode alloc]
  initWithRoutingType:NMARoutingTypeFastest
  transportMode:NMATransportModeScooter
  routingOptions:0];

[coreRouter calculateRouteWithStops:stops routingMode:routingMode
  completionBlock:^(NMARouteResult *routeResult, NMARoutingError error) {

   // If the route was calculated successfully
  if (!error && routeResult && routeResult.routes.count > 0)
  {
  NMARoute* scooterRoute = [routeResult.routes objectAtIndex:0];
  // ...
  }
  else if (error)
  {
  // Display a message indicating route calculation failure
  }
  }];