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!
Solved! Go to Solution.
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.
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.
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?
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
So... No TravelMode for 10.2.8-1 API, Right?
Not that I could find, granted, I may have missed something or over read it.