Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PB-719 : de-activate 3D vegetation by defeault - #patch #964

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/modules/map/components/cesium/CesiumMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ import {
RequestScheduler,
ScreenSpaceEventType,
ShadowMode,
SkyBox,
Viewer,
} from 'cesium'
import { LineString, Point, Polygon } from 'ol/geom'
Expand Down Expand Up @@ -349,19 +348,6 @@ export default {
shadows: false,
// no casting of buildings shadow on the terrain
terrainShadows: ShadowMode.DISABLED,
// skybox/stars visible if sufficiently zoomed out and looking at the horizon
skyBox: new SkyBox({
sources: {
positiveX: new URL('./assets/starbox_px.jpg', import.meta.url).href,
negativeX: new URL('./assets/starbox_mx.jpg', import.meta.url).href,
positiveY: new URL('./assets/starbox_py.jpg', import.meta.url).href,
negativeY: new URL('./assets/starbox_my.jpg', import.meta.url).href,
positiveZ: new URL('./assets/starbox_pz.jpg', import.meta.url).href,
negativeZ: new URL('./assets/starbox_mz.jpg', import.meta.url).href,
},
}),
// we want to see the stars!
skyAtmosphere: false,
baseLayer: false,
useBrowserRecommendedResolution: true,
terrainProvider: await CesiumTerrainProvider.fromUrl(TERRAIN_URL),
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/store/modules/cesium.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
*
* @type Boolean
*/
showVegetation: true,
showVegetation: false,
/**
* Flag telling if the 3D viewer should show buildings (ch.swisstopo.swisstlbuildings3d.3d).
* As this layer has already been updated for the latest Cesium stack, we activate it by
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/tests-e2e/3d/layers.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ describe('Test of layer handling in 3D', () => {
cy.waitUntilCesiumTilesLoaded()
cy.readWindowValue('cesiumViewer').then((viewer) => {
expect(viewer.scene.primitives.length).to.eq(
5,
4,
'should have 1 primitive (GeoJSON) on top of labels and buildings primitives'
)
// test layer added correctly
Expand All @@ -159,14 +159,14 @@ describe('Test of layer handling in 3D', () => {
cy.waitUntilCesiumTilesLoaded()
cy.wait(['@geojson-data', '@geojson-style'])
cy.readWindowValue('cesiumViewer').then((viewer) => {
expect(viewer.scene.primitives.length).to.eq(5) // labels + buildings + vegetation + constructions + GeoJSON layer
expect(viewer.scene.primitives.length).to.eq(4) // labels + buildings + constructions + GeoJSON layer
})
cy.openMenuIfMobile()
cy.get(`[data-cy^="button-remove-layer-${visibleLayerIds[3]}-"]`)
.should('be.visible')
.click()
cy.readWindowValue('cesiumViewer').then((viewer) => {
expect(viewer.scene.primitives.length).to.eq(4) // labels, constructions, vegetation and buildings are still present
expect(viewer.scene.primitives.length).to.eq(3) // labels, constructions and buildings are still present
})
})
// TODO: PB-284 This test is flaky and not always pass on the CI (but is working locally).
Expand Down
Loading