Scooter routing provides route calculation using car roads with scooter-specific speed estimations. This type of routing can be performed online or offline.
In order to perform offline scooter routing, you have to download or prefetch optional data group
ScooterAttributes as in the example below. For more information about Data Groups refer to Map Package Download.
// Select additional data group needed for offline scooter routing MapLoader.getInstance().selectDataGroup(MapPackage.SelectableDataGroup.ScooterAttributes); // Whether download map package(s) MapLoader.getInstance().installMapPackages(packageIdList); // Or prefetch map data MapDataPrefetcher.Request req = MapDataPrefetcher.getInstance().fetchMapData(route, radius);
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 route computation fails.
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, e.g. 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 as in the following example:
CoreRouter router = new CoreRouter(); // Create the RoutePlan and add two waypoints RoutePlan routePlan = new RoutePlan(); routePlan.addWaypoint(new RouteWaypoint(new GeoCoordinate(49.276271, -123.113224))); routePlan.addWaypoint(new RouteWaypoint(new GeoCoordinate(49.1947289, -123.1762924))); RouteOptions routeOptions = new RouteOptions(); routeOptions.setTransportMode(RouteOptions.TransportMode.SCOOTER); routeOptions.setRouteType(RouteOptions.Type.FASTEST); routePlan.setRouteOptions(routeOptions); // Calculate the route, assuming that you have already implemented RouteListener. // See the Car Routing section for more details. router.calculateRoute(routePlan, new RouteListener());