Skip to main content

flywave-mapview.mapview.setelevationsource

Home > @flywave/flywave-mapview > MapView > setElevationSource

MapView.setElevationSource() method

Sets the DataSource which contains the elevations, the elevation range source, and the elevation provider.

Signature:

setElevationSource(elevationSource: TerrainDataSource, elevationRangeSource?: ElevationRangeSource, elevationProvider?: ElevationProvider): Promise<void>;

Parameters

Parameter

Type

Description

elevationSource

TerrainDataSource

The datasource containing the terrain tiles.

elevationRangeSource

ElevationRangeSource

(Optional) Allows access to the elevation min / max per tile.

elevationProvider

ElevationProvider

(Optional) Allows access to the elevation at a given location or a ray from the camera.

Returns:



Promise&lt;void&gt;

## Remarks

Only a single elevation source is possible per [MapView](./flywave-mapview.mapview.md)<!-- -->. If the terrain-datasource is merged with this repository, we could internally construct the [ElevationRangeSource](./flywave-mapview.elevationrangesource.md) and the [ElevationProvider](./flywave-mapview.elevationprovider.md) and access would be granted to the application when it asks for it, to simplify the API.