Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

difference between olcs and ol-cesium #1051

Open
matthias-ccri opened this issue May 11, 2023 · 2 comments
Open

difference between olcs and ol-cesium #1051

matthias-ccri opened this issue May 11, 2023 · 2 comments

Comments

@matthias-ccri
Copy link

Hi,

What is the difference between the olcs package and ol-cesium? I notice they have different SHA hashes.

@gberaudo
Copy link
Member

The olcs package was introduced when we switched to ES6 modules.
Nowadays people should use the olcs package.

I am keeping this issue open so that we do some cleanup around these packages.

@gberaudo
Copy link
Member

Well, here is the full story:

  • ol-cesium
    This npm package contains 1 file in UMD format (in dist) and the src (in src).
    UMD is obsolete stuff, you certainly don't want that and I think we should remove it in the future.
    You can also directly reference the sources like this: import OLCesium from 'ol-cesium/src/olcs/OLCesium.js';.
    That works and it is what I am currently using in projects actually.

  • olcs
    This npm package only contains the source code, put directly at the root (not in a src directory).
    I think we did that package so that it looks nicer when you use it: import OLCesium from 'olcs/OLCesium.js';.
    If I remember correctly, OpenLayers was doing something similar with their "ol" npm package.
    I have not tested but I suppose this still works (and is the recommended way in the Readme).
    Note that import OLCesium from 'olcs'; will not work, which, I suppose, is what you tried in olcs package module path is nonexistent #1062.
    It has never worked but I completly agree that it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants