Select to view content in your preferred language

How can I show the detailed information of a route in the map?

2162
6
03-23-2016 05:42 AM
LinQing
Deactivated User

Hello everyone. I have a problem on route task. I want to show the detailed information about those routes calculated by the solve() function in route task API.

The screenshot is the route results I got.After getting the route results, I want to click one route then show the detailed information of this route. How can I achieve this?

I appreciate any help you can provide.

Tags (1)
0 Kudos
6 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Lin,

I would start with the following sample:

Find closest facilities | ArcGIS API for JavaScript

0 Kudos
LinQing
Deactivated User

Hi Jake,

Thank you for your help. I will have a look and try.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lin,

  That is what the Directions widget was created for:

Directions | API Reference | ArcGIS API for JavaScript

0 Kudos
LinQing
Deactivated User

Hi Robert,

Thank you for your advice. I know this widget but I have already used the routeTask API to solve the route. I wonder if I use this Directions API, I will have to rewrite the solve part.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Lin,

  The directions widget does all the route task stuff behind the scenes for you, so yes it would involve re-working your code.

0 Kudos
LinQing
Deactivated User

Robert,

Got it. I will think about it carefully.

Thank you very much.

0 Kudos