laptop and a wrench

Bug

The queryElevation() method does not return expected results when working with the ArcGIS API for JavaScript elevation sample.

Last Published: December 14, 2018 ArcGIS API for JavaScript
Bug ID Number BUG-000118524
SubmittedDecember 3, 2018
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.9
Operating SystemWindows OS
Operating System VersionN/A
StatusWill Not Be Addressed

Additional Information

ground.queryElevation() returns results calculated based on the highest resolution and ground.createSampler() creates an elevation sampler based on the terrain resolution currently loaded in the view. The reason why the 2 values in your app are different is because they use these 2 different resolutions of the terrain to calculate the z value. If you want to control the resolution then use these methods on the elevation layer and pass in the demResolution that you want it to be calculated for (if you don't know a value, for highest precision results just use "finest-contiguous"). In your example I am changing the resolution for the queryElevation to be more coarse and then I get the same result: https://jsfiddle.net/cu8k5q02/1/ See demResolution option here: http://localhost/arcgis-js-sdk-4/build-artifacts/latest/api-reference/esri-layers-ElevationLayer.html#queryElevation and here: http://localhost/arcgis-js-sdk-4/build-artifacts/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler Feel free to reach back for more questions.

Steps to Reproduce

Bug ID: BUG-000118524

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options