So I'm needing a simple clarification here:
When using JSAPI to pass the webmap's JSON to a GP service, what's actually gathered by...
webMapAsJSON <SPAN class="operator token">=</SPAN> printTask<SPAN class="punctuation token">.</SPAN><SPAN class="token function">_getPrintDefinition</SPAN><SPAN class="punctuation token">(</SPAN>currentMap<SPAN class="punctuation token">,</SPAN> params<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
... is the current state of the map, right? Layers that are turned off (hidden) won't be passed along?
On a previous project I was working on, I had no trouble massaging the webmap inside my GP service to selectively turn things on/off to generate a variety of PDF products. Now, I'm noticing that the JSON is missing any layers that are turned off. Might be a no brainer but I want to confirm this is expected behavior.
Workaround would be to turn on all layers before printTask is called.
Or is there a way to reference the JSON of a webmap in Portal if essentially all the layers in my app derive from the webmap? But that wouldn't have info such as extent they way I needed. Darn! Thanks for any feedback.