Skip to content

Commit

Permalink
Cesium style
Browse files Browse the repository at this point in the history
  • Loading branch information
rmichaelis committed Jun 24, 2024
1 parent 9bd1d61 commit 627adcb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc/conf_db.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ Layers displayed by default on first activation of 3D mode can be defined via th

`ol3d_options` can hand over options to the creation of the Cesium 3d tileset. The parameters are defined as a JSON dict.

There are 3 luxembourg custom parameters:
There are 4 luxembourg custom parameters:
- heightOffset
- latOffset
- longOffset
- cesium3DTileStyle

The other parameters can be any parameters accepted by [Cesium tilesets](https://cesium.com/learn/cesiumjs/ref-doc/Cesium3DTileset.html)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,16 @@ const exports = class extends ngeoOlcsManager {
// if (this.isMeshLayer(layer)) {
// terrainProvider = this.noTerrainProvider;
// }

let cesium3DTileStyle = undefined;
if (cs3d_options.cesium3DTileStyle !== undefined) {
cesium3DTileStyle = cs3d_options.cesium3DTileStyle;
delete cs3d_options.cesium3DTileStyle;
}
const tileset = new Cesium.Cesium3DTileset(cs3d_options);

if (cesium3DTileStyle !== undefined) {
tileset.style = new Cesium.Cesium3DTileStyle (cesium3DTileStyle);
}
this.tilesets3d.push(tileset);
this.ol3d.getCesiumScene().primitives.add(tileset);
// Adjust a tileset's height from the globe's surface.
Expand Down
2 changes: 1 addition & 1 deletion geoportal/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ vars:
- {name: ogc_info_srs}
- {name: ogc_query_layers, type: list}
- {name: ol3d_defaultlayer, type: boolean}
- {name: ol3d_options, type: json, error_message: 'ol3d_options must be valid JSON and may contain the following options: heightOffset, latOffset, longOffset, as well as any options that can be given to Cesium.Cesium3DTileset'}
- {name: ol3d_options, type: json, error_message: 'ol3d_options must be valid JSON and may contain the following options: heightOffset, latOffset, longOffset,cesium3DTileStyle as well as any options that can be given to Cesium.Cesium3DTileset'}
- {name: ol3d_type, type: string, regex: 'data|terrain|mesh', error_message: 'ol3d_type must be data, terrain or mesh ####### comment: type: regex does not work correctly with get_typed in c2cgeoportal, so a non validated string is used :-('}
- {name: page_title}
- {name: print_img}
Expand Down

0 comments on commit 627adcb

Please sign in to comment.