HERE Android SDK Developer's Guide

Truck Routing

The Truck Routing feature in the HERE SDK allows users to calculate routes that can be specifically traveled by trucks and commercial vehicles. Commercial vehicles typically have different regulations for their transportation routes. For example, a government may have laws that restrict trucks carrying flammable materials from traveling in a residential area. By using the Truck Routing feature, you can launch a route calculation that specifically adheres to these restrictions.

Truck Routing and the RouteOptions Class

The RouteOptions class contains a number of truck-specific methods and enums that you should use before performing a route calculation. To perform a truck route calculation, use the TransportMode.TRUCK enum with the setTransportMode(TransportMode) method to specify the route transportation type. You can also set the following truck-specific route options before performing the route calculation:
  • The number of truck trailers
  • The truck height
  • The truck length
  • The truck width
  • The maximum allowed truck weight
  • Hazardous goods that are transported by the truck
  • The category of tunnels that the truck can travel on
  • The truck's weight per axle
Note: Truck routing only supports the RouteOptions.Type.FASTEST routing type. Other routing types are not supported.

A Route Calculation Example

  1. As with the previous routing example, retrieve the CoreRouter, create a RoutePlan and set its waypoints.
  2. Create a new RouteOptions object. The TransportMode should be set to TRUCK.
    // Create the RouteOptions and set its transport mode & routing type
    RouteOptions routeOptions = new RouteOptions();
  3. Set other truck routing options.
  4. Set the RouteOptions to the RoutePlan.
  5. Create a CoreRouter.Listener and then calculate the route by calling CoreRouter.calculateRoute(RoutePlan, Listener).

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