From 1ad79fbe96c1f3debf7166242ee644876b11ef4d Mon Sep 17 00:00:00 2001 From: Luc Claustres Date: Wed, 12 Jun 2024 17:45:05 +0200 Subject: [PATCH] fix: TMS provider not working after CesiumJS upgrade --- map/client/mixins/globe/mixin.base-globe.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/map/client/mixins/globe/mixin.base-globe.js b/map/client/mixins/globe/mixin.base-globe.js index 81f361884..caf77895e 100644 --- a/map/client/mixins/globe/mixin.base-globe.js +++ b/map/client/mixins/globe/mixin.base-globe.js @@ -114,11 +114,17 @@ export const baseGlobe = { provider = cesiumOptions.type // Handle specific case of built-in creation functions createFunction = `create${provider}Async` - if (Cesium[createFunction]) { + if (_.get(Cesium, createFunction)) { provider = createFunction } else { isImageryProvider = true provider += 'ImageryProvider' + // Some providers also have built-in creation functions + createFunction = `${provider}.fromUrl` + if (_.get(Cesium, createFunction)) { + provider = createFunction + args = [cesiumOptions.url].concat([_.omit(cesiumOptions, ['url'])]) + } } } const Constructor = _.get(Cesium, provider)