var terrainProvider = Cesium.createWorldTerrain(); var positions = [ Cesium.Cartographic.fromDegrees(86.925145, 27.988257), Cesium.Cartographic.fromDegrees(87.0, 28.0) ]; var promise = Cesium.sampleTerrain(terrainProvider, 11, positions); Cesium.when(promise, function(updatedPositions) { // positions[0].height and positions[1].height have been updated. // updatedPositions is just a reference to positions. });