Cesium in Meteor

340 views
Skip to first unread message

Wes Tibbitts

unread,
Nov 5, 2015, 11:42:48 AM11/5/15
to cesium-dev
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?

Thanks!

Matthew Amato

unread,
Nov 5, 2015, 12:16:16 PM11/5/15
to cesiu...@googlegroups.com
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.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wes Tibbitts

unread,
Nov 5, 2015, 12:22:50 PM11/5/15
to cesium-dev
I tried that, and just tried a few different variations of that with no change.

Wes Tibbitts

unread,
Nov 5, 2015, 1:46:50 PM11/5/15
to cesium-dev
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'.


On Thursday, November 5, 2015 at 9:16:16 AM UTC-8, Matthew Amato wrote:

Matthew Amato

unread,
Nov 5, 2015, 1:57:22 PM11/5/15
to cesiu...@googlegroups.com
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.

Wes Tibbitts

unread,
Nov 5, 2015, 2:21:42 PM11/5/15
to cesium-dev
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.

Wes Tibbitts

unread,
Nov 5, 2015, 2:23:20 PM11/5/15
to cesium-dev
I do still have to set the base URL global var manually.
Reply all
Reply to author
Forward
0 new messages