6

I'm trying to do a print export using arcgis 10.1 and latest esri jsapi.

Is there any out of the box way that I can extract out Web_Map_as_JSON from a given webmap?

esri.tasks.PrintTask generates a Web_Map_as_JSON object on its execute method.

I can capture the request parameter while posting but I need much cleaner approach. I have to post this to another application which works as a proxy between my client and server.

Please help!

  • 1
    What are you trying to do exactly? Do you want to get the raw JSON request which gets posted to the ExportWebMap geoprocessing task? – Petr Krebs Oct 7 '13 at 18:15
1

You could try PrintTask.prototype._getPrintDefinition(map); You may also want to check out this cereal library as well.

1

Out of the box.. I'm not sure, but you can roll out your own by following this specification:

http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportWebMap_specification/0154000004w8000000/

It's pretty daunting at first, but you do have all the data in the map and layers object. Probably the best tip I can give is for graphic layers: just call graphics.toJson() when you're specify its features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.