Set differents Travel Modes on Offline Routes

3698
5
Jump to solution
03-31-2016 03:40 PM
IgorReuter
New Contributor II

Hello all,

I have a simple question (i never tried it but i think it's possible) about work with offline Routing data on Android API.

Can i use RoutTask with parameters (pre-configured on Network Dataset) to calculate different routes to "Travel Modes"?  Ex: Routes for cars or trucks...

ArcGIS Navigate App for iOS have a quick reference that shows this func and i think it's possible...

Quick reference—Navigate | ArcGIS

Thanks a lot!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
FrankKish
Esri Contributor

I believe from your question your network dataset has pre-existing travel modes and you want to switch between them to find different routing solutions.

If that is the case you can get the Travel Modes defined on the Network dataset using the route task's RouteTaskInfo.  From this object you can get a list of TravelMode objects (getTravelModes).

Then on the RouteParameters object, that you pass into the RouteTask, you can use the setTravelMode to set the one you want to use for a particular solve .... as taken from the list of travel mode objects returned by the RouteTaskInfo as noted above.

See the help doc at

RouteParameters| arcgis-android and RouteTaskInfo| arcgis-android

Hope this helps.

View solution in original post

5 Replies
FrankKish
Esri Contributor

I believe from your question your network dataset has pre-existing travel modes and you want to switch between them to find different routing solutions.

If that is the case you can get the Travel Modes defined on the Network dataset using the route task's RouteTaskInfo.  From this object you can get a list of TravelMode objects (getTravelModes).

Then on the RouteParameters object, that you pass into the RouteTask, you can use the setTravelMode to set the one you want to use for a particular solve .... as taken from the list of travel mode objects returned by the RouteTaskInfo as noted above.

See the help doc at

RouteParameters| arcgis-android and RouteTaskInfo| arcgis-android

Hope this helps.

View solution in original post

TércyoStorck1
New Contributor III

I have the same question and I can't find "setTravelMode" in RouteParameters on 10.2.8-1 API. And these links are broken:

RouteParameters| arcgis-android and RouteTaskInfo| arcgis-android

What do I have to do to set Travel Mode?

0 Kudos
AlexanderNohe1
Regular Contributor II

Looking at the links provided, I believe the previous answer was provided for the ArcGIS Android Beta for Runtime version 100.  The links were at the time pointing to the beta documentation.  For updated links, please view the following:

RouteParameters| arcgis-android  and RouteTaskInfo| arcgis-android 

TércyoStorck1
New Contributor III

So... No TravelMode for 10.2.8-1 API, Right?

0 Kudos
AlexanderNohe1
Regular Contributor II

Not that I could find, granted, I may have missed something or over read it.