Printing map of route task

633
2
06-06-2014 08:04 AM
HeathAnderson
Occasional Contributor II
I am trying to print a map of a route task with the total time and distance appended the PDF printout.  Using the Dijit Print module, the map will print with the route graphic but not the time or distance.  Directions would be okay as well, but not a necessity.  I have not been able to find anything online from the samples or API reference pages.  I have also looked into creating a custom map print layout, hoping to somehow dynamically attach the time and distance to the layout.  Does anyone have a way of accomplishing this or have any suggestions?

Cheers
0 Kudos
2 Replies
ScottGunn
New Contributor III
I haven't done this yet, but I'm looking to add the same sort of functionality into my app.  I think you're on the right track with templates.  It will probably require a mix of templates and Python geoprocessing services. 

You might want to check out this video from the Dev Summit:
http://video.esri.com/iframe/2266/000000/width/960/0/000000

Then have a look at this help document:
http://resources.arcgis.com/en/help/main/10.1/index.html#/Printing_in_web_applications/0154000004w50...

that might get you started, I hope!
0 Kudos
MuditAgarwal
New Contributor III
For printing your values like time or distance with map print, python script can be written and shared as geo processing service for use in arcgis server. Python script will take print template and print map with custom values on the same. Template will have Text Elements to hold custom values.

Here is the example for writing python script for printing.

http://resources.arcgis.com/en/help/main/10.2/index.html#//0057000000mr000000

Write your own python script with help of above link with parameters for your custom fields like time or distance. (you can print current time from python script also).In script Use code from below link to print your values on text elements placed on print template.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000003w000000

Thanks
Mudit
0 Kudos