Open levinzz opened 6 years ago
Hi @levinzz,
It looks like you are using the dist file which is not tested.
Since you are using ES6 modules already, I would suggest you use directly the sources as done in https://github.com/openlayers/ol-cesium#as-an-es6-library.
Thanks @gberaudo, however I think I'll need a bit more details.
Your link eventually points to this example which relies on webpack.config to configure the build aspects. However in Angular, we don't have access to webpack.config, unless we break update compatibility.
That's why I initially used this config method to integrate Cesium. Now I need a clue on how to integrate ol-cesium, from its source instead of the dist file.
@levinzz, how do you deal with OpenLayers?
I use it as described here
Have you tried doing the same for OL-Cesium?
So I removed the ol-cesium lines from .angular-cli.
but I still get one of the two issues :
Uncaught TypeError: Cannot read property 'viewState' of undefined
at eval (BingMaps.js:199)
at Function../src/olcs/core/OLImageryProvider.js.exports.createCreditForSource (olcesium.js:4803)
at exports../src/olcs/core/OLImageryProvider.js.exports.handleSourceChanged_ (olcesium.js:4789)
at BingMaps.eval (olcesium.js:4667)
at BingMaps.boundListener (events.js:41)
at BingMaps.EventTarget.dispatchEvent (EventTarget.js:96)
at BingMaps.Observable.changed (Observable.js:61)
at BingMaps.Source.setState (Source.js:197)
at BingMaps.handleImageryMetadataResponse (BingMaps.js:225)
at window.(anonymous function) (webpack-internal:///./node_modules/ol/net.js:39:5)
There is a known bug about dynamic attributions, see https://github.com/openlayers/ol-cesium/pull/600.
Any luck with the new packages? Can anybody provide an example please?
I setup ol-cesium 2.0.0 in my angular 5 app along with cesium 1.47.0 and ol 5.0.2.
To make it work, I had to change some files as follows :
.angular-cli.json :
main.ts:
typings.d.ts:
and used it as follows:
The globe is created with my objects and a map layer on it but I get the following two errors in the console :
What's going on?