Skip to content

Fix #11103 Update cesium to latest stable 1.131.0 , reviewed all the cesium layers and cesium map.#11331

Merged
dsuren1 merged 13 commits intogeosolutions-it:masterfrom
anup39:fix_cesium_upgrade_11103
Jul 23, 2025
Merged

Fix #11103 Update cesium to latest stable 1.131.0 , reviewed all the cesium layers and cesium map.#11331
dsuren1 merged 13 commits intogeosolutions-it:masterfrom
anup39:fix_cesium_upgrade_11103

Conversation

@anup39
Copy link
Copy Markdown
Member

@anup39 anup39 commented Jul 18, 2025

Description

Updated Cesium to latest stable , review cesium layers and map to be compatible with latest version.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Minor changes to existing features

Issue

What is the current behavior?

#11103

What is the new behavior?

  1. Cesium have been updated to latest stable 1.131.0
  2. removed deprecated methods like ready and readyPromise from the cesium layers
  3. Updated the GeoServerBILTerrainProvider to behave similar to CesiumTerrainProvider
  4. SingleTileImageryProvider constructor parameters options.tileHeight and options.tileWidth became required.
  5. Fix for the ArcGIS Layer in Cesium .
  6. Changed the test case failing as Cesium Changed behavior of DataSourceDisplay.ready to always stay true once it is initially set to true https://github.com/CesiumGS/cesium/blob/main/CHANGES.md#1126---2025-02-03
  7. Overlay Layer is fixed with addition of isDestroyed method. This is now required to make the InfoWindow compatible with Cesium Primitive interface. https://github.com/CesiumGS/cesium/blob/1.131/packages/engine/Source/Scene/Primitive.js#L2436

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other useful information

@anup39 anup39 added this to the 2025.02.00 milestone Jul 18, 2025
@anup39 anup39 self-assigned this Jul 18, 2025
@anup39 anup39 added enhancement 3D All issues related to the 3D rendering in CesiumJs labels Jul 18, 2025
@anup39 anup39 linked an issue Jul 18, 2025 that may be closed by this pull request
1 task
@anup39 anup39 requested a review from allyoucanmap July 18, 2025 13:45
@tdipisa tdipisa requested review from dsuren1 and removed request for allyoucanmap July 21, 2025 12:47
Copy link
Copy Markdown
Contributor

@dsuren1 dsuren1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anup39
Overall, the changes look fine. However, I still noticed some residual use of _ready in a few places. Kindly review and include the necessary updates along with the other requested amendments

url: Cesium.IonResource.fromAssetId(options.assetId, {
accessToken: options.accessToken,
server: options.server
...(config.options.assetId && {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 const options = config.options ?? {};
Suggested change
...(config.options.assetId && {
...(options.assetId && {

I’d recommend using optional chaining to make the implementation more robust in cases where config might be undefined. Also, consider reverting this particular change and add options to the existing object

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +56 to +57
url = WMSUtils.wmsToCesiumOptionsBIL(config).url;
options = WMSUtils.wmsToCesiumOptionsBIL(config) || {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = WMSUtils.wmsToCesiumOptionsBIL(config).url;
options = WMSUtils.wmsToCesiumOptionsBIL(config) || {};
const cesiumOptionsBIL = WMSUtils.wmsToCesiumOptionsBIL(config);
url = cesiumOptionsBIL.url;
options = cesiumOptionsBIL || {};

Kindly avoid calling it twice when the param is same, as some operations can be expensive and can impact performance

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +62 to +63
url = cesiumOptionsMapping(config).url;
options = cesiumOptionsMapping(config).options || {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = cesiumOptionsMapping(config).url;
options = cesiumOptionsMapping(config).options || {};
const cesiumOptions = cesiumOptionsMapping(config);
url = cesiumOptions.url;
options = cesiumOptions.options || {};

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines +72 to +73
url = cesiumIonOptionsMapping(config).url;
options = cesiumIonOptionsMapping(config).options || {};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = cesiumIonOptionsMapping(config).url;
options = cesiumIonOptionsMapping(config).options || {};
const ionOptions = cesiumIonOptionsMapping(config);
url = ionOptions.url;
options = ionOptions.options || {};

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@anup39
Copy link
Copy Markdown
Member Author

anup39 commented Jul 23, 2025

@anup39 Overall, the changes look fine. However, I still noticed some residual use of _ready in a few places. Kindly review and include the necessary updates along with the other requested amendments

@dsuren1 I have removed _ready usage in these particular files and also made other necessary changes.

@anup39 anup39 requested a review from dsuren1 July 23, 2025 07:20
const ionOptions = cesiumIonOptionsMapping(config);
url = ionOptions.url;
options = ionOptions.options || {};
terrainProvider = Cesium.CesiumTerrainProvider.fromUrl(url, options);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
terrainProvider = Cesium.CesiumTerrainProvider.fromUrl(url, options);
if (url) {
terrainProvider = Cesium.CesiumTerrainProvider.fromUrl(url, options);
}

in cesium-ion, there’s a possibility that the assetId might be missing or incorrect, which could result in an undefined URL and subsequently an exception when retrieving the provider. Kindly ensure that similar edge cases are also handled gracefully

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@anup39 anup39 requested a review from dsuren1 July 23, 2025 10:05
@dsuren1 dsuren1 merged commit fe89aa0 into geosolutions-it:master Jul 23, 2025
6 checks passed
@dsuren1
Copy link
Copy Markdown
Contributor

dsuren1 commented Jul 23, 2025

@ElenaGallo Kindly test this in DEV, when available. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3D All issues related to the 3D rendering in CesiumJs enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update CesiumJS dependency to latest stable

3 participants