1

This question already has an answer here:

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?

marked as duplicate by Chad Cooper, BradHards, John Powell, radouxju, Erica Dec 18 '15 at 14:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

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.

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