Select to view content in your preferred language

Saving Web Map JSON?

74
1
Thursday
arcgisbenjamin
New Contributor

In JS SDK, what's the easiest way to save a web map in its current state as a JSON object? Is there a method to generate objects of the ⁠Web Map specification? I see a method to load web maps with WebMap.fromJSON, but can't find where to generate such an object.

I've been building the object from my Map according to the spec, but it's running into quite a few issues.

 

Tags (2)
0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

The absence of a method in the SDK to generate a JSON object in webmap specification appears intentional.  Are you needing the map information in the webmap JSON format, or would perhaps something similar suffice?  I ask because it's fairly easy to get hold of a web_map_as_json object generated by the print module and used as input to the printing service.  It's not the same as the webmap specification, but includes much of the same info.

0 Kudos