Hi,
I asked this question on Stack Overflow without much luck so I thought to try in here. I’ll repost the question, so for reference, the URL is: http://stackoverflow.com/questions/12684914/using-the-combined-build-cesium-js-instead-of-the-individual-js-files
I’ve been going around in circles trying to get the Cesium dependencies not to import when they’re imported from the “combined” Cesium.js.
I’ve got this code to a stage where it’s correctly finding the path of Cesium files, but it is loading up 100’s of them, instead of only the combined Build/Cesium.js and the CesiumViewerWidget (which doesn’t seem to be included in combined). e.g. One of the many files it loads is Source/Core/Clock.js which is built into Build/Cesium.js.
How can I tell dojo or CesiumViewerWidget to assume the core dependencies are already there?
I’m running this with Rails, hence the /assets/ path.
The code I’m working with:
require({
baseUrl: ‘/assets/cesium/Source/Widgets’,
packages: [
// {name: ‘Cesium’, location: ‘…/…/Build/Cesium’},
{name: ‘Widgets/Dojo/CesiumViewerWidget’},
// {name: ‘dojo/on’, location: ‘dojo/on’},
// {name: ‘dojo/dom’, location: ‘dojo/dom’},
// {name: ‘dojo/io-query’, location: ‘dojo/io-query’}
]},
[
‘Widgets/Dojo/CesiumViewerWidget’,
‘dojo/on’, ‘dojo/dom’, ‘dojo/io-query’
], function(CesiumViewerWidget, on, dom, ioQuery) {
})
Thanks,
Gerald