openlayers / ol-cesium

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

how to use this plugin #1176

Closed bridgeToVillage closed 5 months ago

bridgeToVillage commented 6 months ago

I don`t know how to use it, i have used it 4 years ago, now it has two versions,but neither one can be used:

1、 import OLCesium from 'ol-cesium/src/olcs/OLCesium.js'

his dependency was not found:

To install it, you can run: npm install --save ol-cesium/src/olcs/OLCesium.js

2、 import OLCesium from 'olcs'

Module parse failed: Unexpected token (3:17) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

3、 import OLCesium from 'ol-cesium' This dependency was not found:

To install it, you can run: npm install --save ol/layer/BaseVector.js

Finally, I found the file olcesium. umd. js and modified the reference 'require ("ol/layer/BaseVector. js")' to 'require ("ol/layer/Vector. js")`。Guess what? The problem has been solved!

bridgeToVillage commented 6 months ago

No, there's still a problem? Are you sure this plugin works?

bridgeToVillage commented 6 months ago

2.14,This version is available

gberaudo commented 6 months ago

Hello @bridgeToVillage , thanks for your feedback. Could you share what you did exacly?