Cesium in Meteor

Hi, I am trying to work through setting up Cesium in Meteor (with React). I do a $.getScript(‘http://cesiumjs.org/releases/1.11/Build/Cesium/Cesium.js’, …) to pull from your cdn. When I do this it throws an error saying,“Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.”
So I tried setting CESIUM_BASE_URL to the same cdn address that I used in getScript. This pulled in all the js files and displayed a mini map with widgets and credits, but none of the css files. What am I supposed to set the CESIUM_BASE URL to? If the cdn address should work, then does anyone have any clues as to why I can’t pull css files?


While I’m not very familiar with Meteor or React and I’m not sure why Cesium can’t determine the base url in this instances… can you try setting the CESIUM_BASE_URL to http://cesiumjs.org/releases/1.11/Build/Cesium/ and see if that works.

I tried that, and just tried a few different variations of that with no change.

As additional info, when I try to do this the browser tries to pull in ‘http://cesiumjs.org/releases/1.11/Build/Cesium/index.html’, but when I click the link in your response, it redirects ‘http://cesiumjs.org/releases/1.11/Build/Cesium/Cesium.js’.

Have you added the widgets.css file to your project as well: http://cesiumjs.org/releases/1.11/Widgets/widgets.css ? That could be part of the problem. If not, remove your base URL setting code and add the CSS file and see if that works.

Ah, thanks. This was my issue. In trying to migrate old code to Meteor I didn’t see the widgets css. Thanks for your help.

I do still have to set the base URL global var manually.