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 SuperMap3D.SuperMapTerrainProvider({
    url : ''
var positions = [
    SuperMap3D.Cartographic.fromDegrees(86.925145, 27.988257),
    SuperMap3D.Cartographic.fromDegrees(87.0, 28.0)
var promise = SuperMap3D.sampleTerrainMostDetailed(terrainProvider, positions);
SuperMap3D.when(promise, function(updatedPositions) {
    // positions[0].height and positions[1].height have been updated.
    // updatedPositions is just a reference to positions.