I'm trying to get a WebMap object (as JSON) from a JavaScript Map object in the ArcGIS JavaScript API. Is there any way to do this within the API, without using ArcGIS.com? Ideally something like:

var webMapAsJSON = map.toWebMap();

From the "Export Web Map Task" documentation in the REST API, there's this line that suggests it should exist:

"The ArcGIS web APIs (for JavaScript, Flex, Silverlight, etc.) allow developers to easily get this JSON string from the map."

However, I don't see anything in the Map object or elsewhere in the API that would do this. Any ideas?


I have answered this question in an earlier post.

You are headed in the right direction. It is the PrintTask module that has this undocumented capability.

| improve this answer | |

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