-
Notifications
You must be signed in to change notification settings - Fork 20
Cesium config parameters
jmacura edited this page Apr 15, 2024
·
12 revisions
To configure an hslayers-ng project with a Cesium 3D map, an extra configuration must be specified similarly like for a simple hslayers-ng base map project. Either in the main application file (usually app.component.ts's constructor) using this.hsCesiumConfig.update(...) method.
Example:
constructor(private hsCesiumConfig: HsCesiumConfig) {
this.hsCesiumConfig.update({
terrainProvider: 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
terrainLayers: [{
title: 'EU-DEM',
url: 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
active: true
}],
Or in the hslayersCesiumConfig() function in case of the "simple" application.
Example:
function hslayersCesiumConfig() {
return {
terrainProvider: 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
terrainLayers: [{
title: 'EU-DEM',
url: 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles',
active: true
}],
Property | Type | Mandatory | Default Value | Description | Example |
---|---|---|---|---|---|
String | true | Access token for Cesium. Register for it here: https://cesium.com/ion/assets/. | |||
Boolean | false | Should Cesium animate 3D objects. | |||
String | true | Directory of Cesium library. Example: ./node_modules/cesium/Build/Cesium/. | |||
String | true | API key for Bing maps used as Cesium base layer. See: https://www.bingmapsportal.com/. | |||
Boolean | false | Turn on or off FPS counter which is used for performance benchmarking. | |||
Boolean | false | Show 'get feature info' results in Cesium interface. | |||
Boolean | false | Show shadows for objects and terrain. | |||
Cesium.JulianDate | false | Cesium.JulianDate class object which specifies default time value...to set Cesium viewer.clockViewModel.currentTime to. See: https://cesiumjs.org/Cesium/Build/Documentation/JulianDate.html. |
|||
Boolean | false | Turn on or off Cesium timeline. | |||
Element | String | false | The DOM element or ID that will contain the CreditDisplay...If not specified, the credits are added to the bottom of the widget itself. |
|||
Object | false | If no terrain_provider config parameter is present..., then createWorldTerrainOptions object is used in Cesium.createWorldTerrain function to create terrain layer. See: https://cesiumjs.org/Cesium/Build/Documentation/createWorldTerrain.html. |
|||
Cesium.ImageryProvider | false | The imagery provider to use instead of default Bing maps.This value is only valid if Cesium's options.baseLayerPicker is set to false. See: https://cesiumjs.org/Cesium/Build/Documentation/ImageryProvider.html. |
|||
Object | false | This is passed to viewer.terrainProvider configuration option...See: https://cesiumjs.org/Cesium/Build/Documentation/Viewer.html and https://cesiumjs.org/Cesium/Build/Documentation/TerrainProvider.html. |
Example | ||
Array<Object> | false | Objects between which user will be able to choose in layer manager. See terrain_provider config option. | |||
false | Specifies new terrain provider options for Cesium map. | ||||
Number | false | A scalar used to exaggerate the terrain...Default value is 1.0. Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid. |
new Cesium.CesiumTerrainProvider({
url : Cesium.IonResource.fromAssetId(3956),
requestVertexNormals : true
})
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)