Closed FallenRiteMonk closed 7 years ago
This is probably due to the UMD wrapper found in OL3 tasks/build.js. No equivalent mechanism has been contributed to OL3-Cesium yet.
Are there any plans in implementing it into plc in near future? Or can you at least tell me how I can import it in the mean while?
I am not an expert in this.
@bartvde knows better, he wrote such a wrapper in a branch. See discussions in https://github.com/openlayers/ol3-cesium/issues/378 and code at https://github.com/bartvde/ol3-cesium/blob/npm/build/build.js#L18-L30
The function seems to detect if the library is included in the context of commonjs
and inject the olcs
namespace accordingly.
I hope it helps.
@gberaudo do I understand correctly that ol3-cesium was published without the UMD wrapper being added?
Yes indeed, following what we discussed in https://github.com/openlayers/ol3-cesium/issues/378.
OpenLayers and this project are moving towards ES6 modules. There are still lots to do and I do not have much time so I have no ETA yet. You may have a look to the jscodeshift transforms in https://github.com/openlayers/openlayers/tree/master/transforms. We also need to finish getting ride of the closure compiler library.
Please reopen if you have some ideas, feedback.
I have problems importing ol3-cesium into a webpack angular2 library. I managed to import ol3 and it also works. Now I wanted to extend it by cesium, but i get the following error wen running tsc:
error TS2307: Cannot find module 'ol3-cesium'
on the following line of code:import { OLCesium } from 'ol3-cesium';
the same import works on ol3(example line:import { Map } from 'openlayers';
Can anybody please help me and if more information is needed, just ask.
P.S.: tsconfig.json might also be interesting: