AnsweredAssumed Answered

Data Driven Pages in a Web Map or Specifying Extents for the PrintTask

Question asked by Glitchy on Sep 1, 2015
Latest reply on Mar 3, 2016 by Glitchy

We are trying to recreate the data driven pages process of ArcMap in a web map application.  So far we have a Geoprocessor service that the web map application calls to generate the GridIndex and adds graphics to the map indicating the tiles to be printed.   Next we would like to use this collection of extents to send to the PrintTask one at a time, but extents is not an accepted parameter of the PrintTask. 

We attempted  to set the web map to each set of extents and then send a print request but the loop is too fast for the setExtent method and we end up with multiple prints of the last set of extents. 

 

Does anyone else have a solution for producing Data Driven Pages in a web map with ESRI's JS API?

 

As far as I can tell the possible solutions are:

Option A: Modify the Geoprocessor that generates the Gird index to also either call the Export Web Map Task for each of the extents, or use another method to generate the PDFs and serve them to the user.  Better yet if it could combine the collection of PDFs into one multi page PDF.

 

Option B: Reverse engineer the JSON call produced by the PrintTask and loop through the collection of extents and send them to the Export Web Map Task.

 

Any help will be greatly appreciated.

Outcomes