question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to import package ?

See original GitHub issue

I don’t understand how to use this package. I tried to import in several ways, but I always ended up with errors… I a m using webpack and I found this link: https://github.com/openlayers/ol-cesium/issues/594 but it seems the code is stale.

Basically here is what I did based on the doc:

import OLCesium from 'ol-cesium';
// import OLCesium from 'olcs/OLCesium.js';

// ... map declaration

const ol3d = new OLCesium({ map }); // ol2dMap is the ol.Map instance
ol3d.setEnabled(true);

I had errors like Cesium is not defined so I tried to install cesium from npm but don’t know how to load it, there’s no doc for that… I am using OL 5.3.0.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gberaudocommented, Jun 13, 2019

@NevenD, you simply need to add this line before the OLCesium script: <script href="https://cesiumjs.org/releases/1.58/Build/Cesium/Cesium.js"></script>

0reactions
eljaytegmarkcommented, Mar 27, 2022

This worked for me: <script src="https://cdn.jsdelivr.net/npm/cesium@1.91.0/Build/Cesium/Cesium.js"></script>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java Packages and How to import them? - Programiz
Right-click on the source folder. · Go to new and then package. New package in Intellij IDEA · A pop-up box will appear...
Read more >
Java Packages - W3Schools
The library is divided into packages and classes. Meaning you can either import a single class (along with its methods and attributes), or...
Read more >
Using Package Members - Java™ Tutorials
Importing an Entire Package ... To import all the types contained in a particular package, use the import statement with the asterisk (*)...
Read more >
Packages in Java: How to Create/Import Package - Guru99
Choose the name of the package · Include the package command as the first line of code in your Java Source File. ·...
Read more >
Java Packages and import statement | Studytonight
To import java package into a class, we need to use java import keyword which is used to access package and its classes...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found