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 | The datasource containing the terrain tiles. | |
elevationRangeSource | (Optional) Allows access to the elevation min / max per tile. | |
elevationProvider | (Optional) Allows access to the elevation at a given location or a ray from the camera. |
Returns:
Promise<void>
## 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.