HERE Android SDK Developer's Guide

Bicycle Routing

The bicycle routing feature provides route calculation using car and pedestrian roads with bicycle-specific speed estimations. This type of routing can be performed online or offline, with elevation data being available in an online request.

Note:
  • Bicycle routing is currently offered as a beta feature. APIs may change without notice. Do not use this feature in a commercial application.
  • Bike-specific roadways are not yet supported.

Bicycle routing includes pedestrian-only roads and road segments that require traversing a one-way road opposite the allowed direction of travel. When a road is not open for driving in the travel direction, the routing algorithm assumes that the user must walk the bicycle, and therefore it uses the pedestrian walking speed for such segments. As a special exception to this rule, pedestrian segments located in parks are assumed to be open for bicycles, so full bicycle speed is used there. Generally, such walk-only segments are used in bicycle routing only when they provide a big shortcut, or when a waypoint is located on such a segment.

Performing a Bicycle Routing Request

You can perform bicycle routing by using the CoreRouter class and RouteOptions.TransportMode.BICYCLE, as shown 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.BICYCLE);
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());

Route Elevation

In an online bicycle routing session, the HERE SDK considers elevation changes when determining what speed should be used on the given road. When going uphill, speed decreases, possibly down to the pedestrian speed. When going downhill, speed increases.

Note: Elevation-based speed estimations may change in the future.

You can also create an elevation profile of a route, similar to the following screenshot, by using altitude data of the points on a calculated route.

Figure 1. Plotted Chart of Elevations

To retrieve this elevation data, call the Route.getRouteGeometryWithElevationData() method and inspect the altitude on each returned GeoCoordinate object. If the altitude is not known at that location, calling GeoCoordinate.getAltitude() returns the GeoCoordinate.UNKNOWN_ALTITUDE value.

Note: Route altitude data is available in online calculated routes for cars, pedestrians, trucks, and bicycles.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.