Skip to content

Commit

Permalink
fix: TMS provider not working after CesiumJS upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jun 12, 2024
1 parent 599699b commit 1ad79fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion map/client/mixins/globe/mixin.base-globe.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ad79fb

Please sign in to comment.