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

#9464: fix issue of not showing background layer in case of switching from 2D mode to 3D mode #9614

Merged
merged 7 commits into from
Oct 23, 2023
8 changes: 8 additions & 0 deletions docs/developer-guide/mapstore-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ This is a list of things to check if you want to update from a previous version

## Migration from 2023.02.xx to 2024.01.00

### Fixing background config

From this version in order to fix default 3d background config a change is needed here
- `localConfig.json` by adding **visibility: false** to the Empty Background entry in intialState.defaultState.catalog.default.staticServices.default_map_backgrounds.backgrounds
- `new.json` by adding **visibility: false** to the Empty Background entry

see this PR [9614](https://github.com/geosolutions-it/MapStore2/pull/9614/files) for more details
mahmoudadel54 marked this conversation as resolved.
Show resolved Hide resolved

### Adding spatial filter to dashboard widgets

In order to enable the possibility to add in and the spatial filter to the widgets ( see [#9098](https://github.com/geosolutions-it/MapStore2/issues/9098) ) you have to edit the `QueryPanel` config in the `plugins.dashboard` array of the `localConfig.json` file by adding:
Expand Down
3 changes: 2 additions & 1 deletion web/client/components/map/cesium/Layer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class CesiumLayer extends React.Component {

componentDidMount() {
this.createLayer(this.props.type, this.props.options, this.props.position, this.props.map, this.props.securityToken);
if (this.props.options && this.layer && this.getVisibilityOption(this.props)) {
let mapHasDefaultBackgroundLayer = this.props.map.scene.imageryLayers.length; // TO CHECK IF THERE IS AN EXISTING ACTIVE BACKGROUND LAYER IF NOT ADD THIS LAYER BE THE DEFAULT
if (this.props.options && this.layer && this.getVisibilityOption(this.props) && !mapHasDefaultBackgroundLayer) {
this.addLayer(this.props);
this.updateZIndex();
}
Expand Down
3 changes: 2 additions & 1 deletion web/client/configs/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@
"group": "background",
"title": "Empty Background",
"fixed": true,
"type": "empty"
"type": "empty",
"visibility": false
mahmoudadel54 marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion web/client/configs/new.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@
"group": "background",
"title": "Empty Background",
"fixed": true,
"type": "empty"
"type": "empty",
"visibility": false
}
]
}
Expand Down
Loading