* Initiates a terrain height query for an array of Cartographic positions by * requesting tiles from a terrain provider, sampling, and interpolating. The interpolation * matches the triangles used to render the terrain at the specified level. The query * happens asynchronously, so this
( terrainProvider, level, positions, rejectOnTileFail, )
| 44 | * } |
| 45 | */ |
| 46 | async function sampleTerrain( |
| 47 | terrainProvider, |
| 48 | level, |
| 49 | positions, |
| 50 | rejectOnTileFail, |
| 51 | ) { |
| 52 | if (!defined(rejectOnTileFail)) { |
| 53 | rejectOnTileFail = false; |
| 54 | } |
| 55 | //>>includeStart('debug', pragmas.debug); |
| 56 | Check.typeOf.object("terrainProvider", terrainProvider); |
| 57 | Check.typeOf.number("level", level); |
| 58 | Check.typeOf.bool("rejectOnTileFail", rejectOnTileFail); |
| 59 | Check.defined("positions", positions); |
| 60 | //>>includeEnd('debug'); |
| 61 | |
| 62 | return doSampling(terrainProvider, level, positions, rejectOnTileFail); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * @param {object[]} tileRequests The mutated list of requests, the first one will be attempted |
searching dependent graphs…