Select to view content in your preferred language

Driving Directions button/capability addition to map app

1891
3
Jump to solution
06-20-2012 05:54 AM
PJNabors
Regular Contributor
How can I add driving directions capability to my map app?

Test web app: http://tva.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=e541c091f87e4cdd8eeb057a5a5e6d7...'

Thanks,
PJ
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AmberT
by
Deactivated User
Hi PJ,

This is not an easy task, I have attempted to do this in the past with no luck.  You need to look at the API's for help.  The JavaScript API would probably be the easiest and it is free (where as the Flex API requires Adobe Flex and the Silverlight API requires Microsoft Silverlight).  Here is a link to the concept page of the JavaScript API http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm.  If you navigate to 'Inside the API' and then down to "Popups and Info Windows" it gives you code examples of the different types of things you can add to a pop-up.  If you couple that with the "Using the RouteTask" examples you may be able to do it.  This requires a geoprocessing task and there is a sample ArcGIS server that you can use but it will max out the number of directions given (I think around a million a month).

On the "Samples" tab at the top of the API page you will get full code for some examples.  Here you want to look at the "Find and Identify" examples for the pop-ups and the "Network Analyst" for the directions.

You will need to host this on your own web server.  There is code to have it reference your ArcGIS Online Maps.  You can use the sample GIS server for the directions task depending on your use,free for personal I believe.  If you have an ArcGIS Server than you can create your own geoproccessing task for directions (if you have the network analyst extension).

Good Luck,
Amber

View solution in original post

0 Kudos
3 Replies
PJNabors
Regular Contributor
Still haven't gotten an answer to this.  Any chance of someone uploading a Basic Viewer that has a driving directions button? 🙂
0 Kudos
AmberT
by
Deactivated User
Hi PJ,

This is not an easy task, I have attempted to do this in the past with no luck.  You need to look at the API's for help.  The JavaScript API would probably be the easiest and it is free (where as the Flex API requires Adobe Flex and the Silverlight API requires Microsoft Silverlight).  Here is a link to the concept page of the JavaScript API http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm.  If you navigate to 'Inside the API' and then down to "Popups and Info Windows" it gives you code examples of the different types of things you can add to a pop-up.  If you couple that with the "Using the RouteTask" examples you may be able to do it.  This requires a geoprocessing task and there is a sample ArcGIS server that you can use but it will max out the number of directions given (I think around a million a month).

On the "Samples" tab at the top of the API page you will get full code for some examples.  Here you want to look at the "Find and Identify" examples for the pop-ups and the "Network Analyst" for the directions.

You will need to host this on your own web server.  There is code to have it reference your ArcGIS Online Maps.  You can use the sample GIS server for the directions task depending on your use,free for personal I believe.  If you have an ArcGIS Server than you can create your own geoproccessing task for directions (if you have the network analyst extension).

Good Luck,
Amber
0 Kudos
PJNabors
Regular Contributor
Thanks so much for the help!
0 Kudos