I'd like to report a broken functionality, I cannot create the ElevationLayer in webworker anymore, ending with the error of:
{name: "ReferenceError", message: "document is not defined", details: undefined}
Webworker file (excerpt)
Calculator<SPAN class="punctuation token">.</SPAN>prototype<SPAN class="punctuation token">.</SPAN>startViewshed <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>data<SPAN class="punctuation token">,</SPAN> connection<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="operator token">!</SPAN>elevationLayer <SPAN class="operator token">||</SPAN> elevationLayer<SPAN class="punctuation token">.</SPAN>url <SPAN class="operator token">!==</SPAN> data<SPAN class="punctuation token">.</SPAN>url<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// --> Error happens here</SPAN>
elevationLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ElevationLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">{</SPAN>
url<SPAN class="punctuation token">:</SPAN> data<SPAN class="punctuation token">.</SPAN>url
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN>
<SPAN class="punctuation token">.</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I need to create the ElevationLayer so I can create an elevationSampler and run the analysis on it. Apparently, the 4.11 version does require a 'document' to be available, whereas it wasn't a requirement for 4.10 version of ElevationLayer class.
Please advise the relevant workaround for this issue. Thank you.