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#queryE... 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.
var layer = new ElevationLayer({
portalItem: { // public Elevation layer
id: "258fc22265f74dfb9a7b2d48338ff2de"
}
});
Does the
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#queryE... example indeed return an error or do I miss something here?
Thanks in advance.
Solved! Go to Solution.
The syntax to create a Multipoint is incorrect.
// Incorrect
new Multipoint(points)
// Correct
new Multipoint({points: points})
Once I fixed that, your codepen sample worked.
The syntax to create a Multipoint is incorrect.
// Incorrect
new Multipoint(points)
// Correct
new Multipoint({points: points})
Once I fixed that, your codepen sample worked.
Thank you Rene,
much appreciated.