-
Notifications
You must be signed in to change notification settings - Fork 20
Cesium config parameters
jmacura edited this page May 13, 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({
terrainLayers: [{
title: 'Cesium World Terrain',
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 {
terrainLayers: [{
title: 'Cesium World Terrain',
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 | false | Should Cesium animate 3D objects. | ||
String | true | Directory of Cesium library. Example: ./node_modules/cesium/Build/Cesium/. | |||
Boolean | false | false | Show Base Layer Picker widget. Usually LayerManager takes over its functionality. | ||
String | true | API key for Bing maps used as Cesium base layer. See: https://www.bingmapsportal.com/. | |||
Boolean | false | false | Turn on or off FPS counter which is used for performance benchmarking. | ||
Boolean | false | true | Show full screen button. | ||
Boolean or an array of GeocoderServices | false | false | Can be used to display Cesium's geocoder widget instead of (or in addition to) hslayers' search toolbar | ||
Boolean | false | false | Show 'get feature info' results in Cesium interface. | ||
Number | false | 0 | Show shadows for objects and terrain. Values match the enum https://cesium.com/learn/cesiumjs/ref-doc/global.html?classFilter=shadow#ShadowMode | ||
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. |
|||
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. |
|||
Array<Terrain Layer> | false | Terrains between which user will be able to choose in layer manager...The config object must have structure as in the example at the top of the page. Supported terrain formats are CesiumTerrainProvider (QunatizedMesh or HeightMap) and ArcGISTiledElevationTerrainProvider (esriImageServiceDataTypeElevation). |
|||
Number | false | 1.0 | A scalar used to exaggerate the terrain and 3D tiles...Default value is 1.0. Note that vertical exaggeration will not modify other primitives as they are positioned relative to the ellipsoid. |
title?: string;
url: string;
active?: boolean;
visible?: boolean;
options?: CesiumTerrainProvider.ConstructorOptions;
type?: 'terrain';
};
also see CesiumTerrainProvider.ConstructorOptions
new Cesium.CesiumTerrainProvider({
url : Cesium.IonResource.fromAssetId(3956),
requestVertexNormals : true
})
Quick Links: Home ➖ App configuration ➖ Layer configuration ➖ Cesium configuration ➖ Composition schema (separate repo)