Hello!
What I want to do is retrieve the elevation of a known point using ArcGIS javascript 4.14. A working example of an an elevation layer query based on the following https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation would be great.
I have a similar piece of code in the following link https://codepen.io/nikolakakis/pen/jObOjEv?editors=1111 I always get the error Failed to query elevation: TypeError: Cannot read property 'wkid' of undefined
I tried with an Elevation layer I uploaded and made it public with the same results.
<SPAN class="keyword token">var</SPAN> layer <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>
portalItem<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="comment token">// public Elevation layer</SPAN>
id<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"258fc22265f74dfb9a7b2d48338ff2de"</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>Does the
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation example indeed return an error or do I miss something here?
Thanks in advance.