Support for multiple Section Types

Support for multiple Section Types when calculating a route only one section type can be specified to be returned, as opposed to the REST API where multiple section types can be added.

My use case requires me to check various section types like traffic, motorway, and tollRoad, is there a way to do this, that I’m perhaps missing, through the Android SDK or would I be forced to revert to implementing the REST API until this might become available in the SDK?

If I understand you correctly you can use the parameter avoidType in RouteDescriptor as it is presented here to specify which types you want to avoid.

Hey @witkow_l I’m not trying to avoid types, I’m trying to declare which section types to return in the response. Currently it seems that only 1 at a time is supported but on the rest API the sectionType parameter can be added multiple times. Here is a code sample:

val routeDesc = RouteDescriptor.Builder()

    val routeCalculationDesc = RouteCalculationDescriptor.Builder()

Note .sectionType only supports 1 value, I can’t specify a list of section types and calling it multiple times replaces the value not add more sectionTypes

You are right RouteCalculationDescriptor accepts only one sectionType, however, you can work around this problem by using BatchRouting Batch routing | Routing, Routing Examples | Maps SDK for Android | TomTom Developer Portal. You can specify there many different RouteCalculationDescriptors and as a result receive BatchRoutesPlan, which contains a list of RoutePlan. Thanks to that you will have how many section types as you define RouteCalculationDescriptors