Just curious if there is an "out of the box" way to get the web map as JSON from the current AGOL webmap from within a custom widget? Unfortunately, due to client specifications I cannot conform to the Export Web Map Task parameters for the GP Service I'll be using.
I know with the JavaScript API, I can use the PrintTask to do the work for me to get the map in the current state by doing this:
<SPAN class="keyword token">var</SPAN> printTask <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">PrintTask</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">var</SPAN> Web_Map_as_JSON <SPAN class="operator token">=</SPAN> printTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">_getPrintDefinition</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>map<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>