openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
968 stars 321 forks source link

Resolving 'Cesium is not Defined' Error in OL 6 with OLCS Using TypeScript #1181

Closed LucasMali closed 2 weeks ago

LucasMali commented 3 months ago

Hello there,

I am experiencing an issue with OL 6 (the latest version) with OLCS. I am using TypeScript and following the imports as suggested in the README. However, I received an error message saying, "Cesium is not defined." I have searched for a solution and found a thread on this topic, but it didn't provide any helpful solution to my problem. I follow the documentation accurately, so I am trying to figure out what I am doing wrong. Any assistance would be greatly appreciated.

XiaofengZeng commented 3 months ago

@LucasMali Hi, Lucas. As of today, the latest version of Openlayers is v9.1.0. and for your problem, you need to make sure that the Cesium dependency library is mounted on the window object. It will be get by window.Cesium.