Fix #11103 Update cesium to latest stable 1.131.0 , reviewed all the cesium layers and cesium map.#11331
Conversation
…o latest stable 1.131.0
… upgrade to latest stable
…x_cesium_upgrade_11103
…eady to always stay true once it is initially set to true
…ory to create the Single Tile
There was a problem hiding this comment.
@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 && { |
There was a problem hiding this comment.
const options = config.options ?? {};| ...(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
| url = WMSUtils.wmsToCesiumOptionsBIL(config).url; | ||
| options = WMSUtils.wmsToCesiumOptionsBIL(config) || {}; |
There was a problem hiding this comment.
| 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
| url = cesiumOptionsMapping(config).url; | ||
| options = cesiumOptionsMapping(config).options || {}; |
There was a problem hiding this comment.
| url = cesiumOptionsMapping(config).url; | |
| options = cesiumOptionsMapping(config).options || {}; | |
| const cesiumOptions = cesiumOptionsMapping(config); | |
| url = cesiumOptions.url; | |
| options = cesiumOptions.options || {}; |
| url = cesiumIonOptionsMapping(config).url; | ||
| options = cesiumIonOptionsMapping(config).options || {}; |
There was a problem hiding this comment.
| url = cesiumIonOptionsMapping(config).url; | |
| options = cesiumIonOptionsMapping(config).options || {}; | |
| const ionOptions = cesiumIonOptionsMapping(config); | |
| url = ionOptions.url; | |
| options = ionOptions.options || {}; |
@dsuren1 I have removed |
| const ionOptions = cesiumIonOptionsMapping(config); | ||
| url = ionOptions.url; | ||
| options = ionOptions.options || {}; | ||
| terrainProvider = Cesium.CesiumTerrainProvider.fromUrl(url, options); |
There was a problem hiding this comment.
| 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
|
@ElenaGallo Kindly test this in DEV, when available. Thanks! |
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)
Issue
What is the current behavior?
#11103
What is the new behavior?
readyandreadyPromisefrom the cesium layersGeoServerBILTerrainProviderto behave similar toCesiumTerrainProviderSingleTileImageryProviderconstructor parameters options.tileHeight and options.tileWidth became required.isDestroyedmethod. 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#L2436Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information