sampleTerrainMostDetailed(terrainProvider, positions)Promise.<Array.<Cartographic>>

Initiates a sampleTerrain() request at the maximum available tile level for a terrain dataset.
Name Type Description
terrainProvider TerrainProvider The terrain provider from which to query heights.
positions Array.<Cartographic> The positions to update with terrain heights.
A promise that resolves to the provided list of positions when terrain the query has completed. This promise will reject if the terrain provider's `availability` property is undefined.
// Query the terrain height of two Cartographic positions
var terrainProvider = new Cesium.CesiumTerrainProvider({
    url : ''
var positions = [
    Cesium.Cartographic.fromDegrees(86.925145, 27.988257),
    Cesium.Cartographic.fromDegrees(87.0, 28.0)
var promise = Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
Cesium.when(promise, function(updatedPositions) {
    // positions[0].height and positions[1].height have been updated.
    // updatedPositions is just a reference to positions.