# Terrain Elevation with ArcGIS Tiled Elevation Terrain

**URL:** <https://community.cesium.com/t/terrain-elevation-with-arcgis-tiled-elevation-terrain/8450>\
**Category:** CesiumJS\
**Created:** [July 11, 2019, 2:50pm UTC](https://community.cesium.com/t/terrain-elevation-with-arcgis-tiled-elevation-terrain/8450 "2019-07-11T14:50:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyasurek](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@jyasurek](https://community.cesium.com/u/jyasurek)\
**Post date:** [July 11, 2019, 2:50pm UTC](https://community.cesium.com/t/terrain-elevation-with-arcgis-tiled-elevation-terrain/8450/1 "2019-07-11T14:50:09Z")

</div>

1. A concise explanation of the problem you're experiencing.

Unable to retrieve terrain height at a position using sampleTerrain. May be unsupported? Looking for a work around.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.  
Paste into sandcastle

var viewer = new Cesium.Viewer('cesiumContainer', {

});

var terrainProvider = new Cesium.ArcGISTiledElevationTerrainProvider({  
&nbsp;&nbsp;&nbsp;&nbsp;url: ‘[https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer](https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer)’  
});

terrainProvider.readyPromise.then(function(isReady){  
&nbsp;&nbsp;&nbsp;&nbsp;console.log('Ready:'+isReady);  
&nbsp;&nbsp;&nbsp;&nbsp;viewer.terrainProvider = terrainProvider;  
&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;var samplePos = [  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cesium.Cartographic.fromDegrees(-77.134487059577509, 38.6777220281884)  
&nbsp;&nbsp;&nbsp;&nbsp;];  
&nbsp;&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;var promise = Cesium.sampleTerrain(viewer.terrainProvider, 15, samplePos);   
&nbsp;&nbsp;&nbsp;&nbsp;promise.then(function(promise){  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Latitude:' + Cesium.Math.toDegrees(samplePos[0].latitude));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Longitude:' + Cesium.Math.toDegrees(samplePos[0].longitude));  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log('Height:' + samplePos[0].height);  
&nbsp;&nbsp;&nbsp;&nbsp;});   
});

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

Need to gather terrain heights at specific locations. Workarounds are acceptable

4. The Cesium version you're using, your operating system and browser.  
1.59  
Sandcastle ArcGIS Tiled Elevation Terrain Example

---

<div class="post-metadata">

**Author:** ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)\
**Post date:** [July 16, 2019, 7:52pm UTC](https://community.cesium.com/t/terrain-elevation-with-arcgis-tiled-elevation-terrain/8450/2 "2019-07-16T19:52:38Z")

</div>

I believe this is a bug - I posted some of my debugging notes here and pinged Tom Fili who might have a better idea where the issue is:

[https://github.com/AnalyticalGraphicsInc/cesium/issues/8007](https://github.com/AnalyticalGraphicsInc/cesium/issues/8007)
