Fleet Telematics Custom Routes
Fleet Telematics Custom Routes (FTCR) API provides functionality to calculate a route, show it on map and perform simple turn-by-turn navigation using HERE map data and customers' private map data. FTCR
API is similar to common routing and navigation, but it offers limited functionality compare to them. For more information about use cases that can be covered by FTCR, check Fleet Telematics Custom Routes API Developer's Guide.
FTCR Classes
Class | Description |
---|---|
FTCRRouter | Route calculation executor for Fleet Telematics Custom Route. |
FTCRRoutePlan | Contains all information needed to calculate the ftcr route. |
FTCRRouteOptions | Contains options for ftcr route calculation. |
FTCRRoute | Represents a distinct Fleet Telematics custom path connecting two or more waypoints. |
FTCRNavigationManager | A navigation manager class that provides guidance advice and information along the FTCR routes. |
FTCRMapRoute | Represents a FTCRRoute that can be displayed on a Map . |
FTCRLaneInformation | Represents information about lane information on the FTCRManeuver . |
FTCRManeuver | Represents information about maneuver on the FTCRRoute . |
FTCRRouteWarning | Describes warning for FTCRRoute . |
FTCRVoiceGuidanceOptions | Allows to configure voice prompts for FTCR guidance. |
FTCR route calculation
Steps to calculate FTCRRoute
are the same as for common routing. Use classes from ftcr
package: FTCRRouter
, FTCRRoutePlan
and FTCRRouteOptions
to calculate a route. Note, that route calculation only works in online mode. See example to calculate FTCR route below:
void calculateRoute() {
// waypoints setup
final RouteWaypoint start = new RouteWaypoint(new GeoCoordinate(52.514184, 13.316419));
RouteWaypoint destination = new RouteWaypoint(new GeoCoordinate(52.512272, 13.383096));
List<RouteWaypoint> waypoints = Arrays.asList(start, destination);
// fleet telematics options
FTCRRouteOptions routeOptions = new FTCRRouteOptions();
routeOptions.setUseTraffic(true)
// Other transport modes such as TRUCK, PEDESTRIAN, SCOOTER, BICYCLE
// and BUS are also supported.
.setTransportMode(FTCRRouteOptions.TransportMode.CAR)
.setRouteType(FTCRRouteOptions.Type.FASTEST)
// see API reference to check all possible routing options
.addAvoidArea(new GeoBoundingBox(new GeoCoordinate(52.521842, 13.375375),
new GeoCoordinate(52.518212, 13.380335)));
FTCRRouter router = new FTCRRouter();
FTCRRoutePlan ftcrRoutePlan = new FTCRRoutePlan(waypoints, routeOptions);
// set overlay name if needed
ftcrRoutePlan.setOverlay("OVERLAYNAME");
router.calculateRoute(ftcrRoutePlan, new FTCRRouter.Listener() {
@Override
public void onCalculateRouteFinished(@NonNull List<FTCRRoute> routes,
@NonNull FTCRRouter.ErrorResponse error) {
if (error.getErrorCode() == RoutingError.NONE && !routes.isEmpty()) {
startNavigation(routes.get(0));
}
}
});
}