text
stringlengths
0
8.81k
rejectOnTileFail
boolean
false
optional
If true, for a failed terrain tile request the promise will be rejected. If false, returned heights will be undefined.
Returns:
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.
Example:
// Query the terrain height of two Cartographic positions
const terrainProvider = await Cesium.createWorldTerrainAsync();
const positions = [
Cesium.Cartographic.fromDegrees(86.925145, 27.988257),
Cesium.Cartographic.fromDegrees(87.0, 28.0)
];
const updatedPositions = await Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
// positions[0].height and positions[1].height have been updated.
// updatedPositions is just a reference to positions.
// To handle tile errors, pass true for the rejectOnTileFail parameter.
try {
const updatedPositions = await Cesium.sampleTerrainMostDetailed(terrainProvider, positions, true);
} catch (error) {
// A tile request error occurred.
}
Stereographic(position, tangentPlane)
engine/Source/Core/Stereographic.js 19
Represents a point in stereographic coordinates, which can be obtained by projecting a cartesian coordinate from one pole onto a tangent plane at the other pole.
The stereographic projection faithfully represents the relative directions of all great circles passing through its center point.
To faithfully represents angles everywhere, this is a conformal projection, which means points are projected onto an arbrary sphere.
Name
Type
Description
position
Cartesian2
optional
The steroegraphic coordinates.
tangentPlane
EllipseGeometry
optional
The tangent plane onto which the point was projected.