Comments (15)
The last two errors look strange:
- ol3-cesium/src/core.js:521: found and required struct look compatible;
- ol3-cesium/src/core.js:746: the displayed function signature is wrong.
There is no feature
parameter.
http://openlayers.org/en/master/apidoc/ol.feature_.html#FeatureStyleFunction
How do you get these errors?
from ol-cesium.
@schmidtk Can you please respond to @gberaudo's comment above?
from ol-cesium.
We're building ol3 + ol3-cesium + our application together using the Closure Ant task with advanced compilation. The Closure library and compiler versions we're using are recent as of last week from the GitHub repos. Both of those errors look (hopefully) straightforward to fix though.
[java] ol3-cesium/src/core.js:521: ERROR - actual parameter 1 of Cesium.BillboardCollection.prototype.add does not match formal parameter
[java] found : {image: (HTMLCanvasElement|HTMLVideoElement|Image|null|string), position: Cesium.Cartesian3}
[java] required: {image: string, position: Cesium.Cartesian3}
Cesium.BillboardCollection.prototype.add
is only expecting a string, while the ol.style.Image#getImage call has a return type of {HTMLCanvasElement|HTMLVideoElement|Image}
. These are incompatible and caused the error.
The externs file should be updated to reflect the possible input types for Billboard.image, which looks to be {Image|Canvas|String|Billboard~CreateImageCallback}
from the setImage function. It should accept {HTMLCanvasElement|HTMLVideoElement|Image|string}
, with the possible exception of HTMLVideoElement
.
[java] ol3-cesium/src/core.js:746: ERROR - "function (this:ol.Feature, number): (Array.<(null|ol.style.Style)>|null)" must be called with a "this" type
[java] style = featureStyle(resolution);
this:ol.Feature
isn't a parameter, it's the this
context for ol.feature.FeatureStyleFunction. The function should be invoked as featureStyle.call(feature, resolution)
.
from ol-cesium.
Just a couple of notes about the build:
We are using the command line runner, not the ant task. If any of the warning types can be changed to errors without causing compilation errors in the Closure library itself, then we make them errors (it's darn near most of them). I can try to pull down the exact list if you like.
from ol-cesium.
We must add a Makefile target to compile ol3cesium+ol3 together.
Currently we have nothing to test the fixes against and even if we fix
the code today there will always be unnoticed regressions.
Could it be possible that you contribute this target?
In the meanwhile I will create a PR with a 'tentative fix'.
#82
from ol-cesium.
See #2753 for a fix for the first compiler error.
from ol-cesium.
Discussed on the meeting:
- The 1) requires change in ol3 externs - to be done by @ahocevar
- The 2) camera.js:257 3) camera.js:315 4) camera.js:346 to be fixed on ol3cesium side - it is recent change in ol3 - to be done by @petrsloup
- The 5) core.js:509 is pixelRatio parameter - to be fixed by @elemoine
- The 6) core.js:521 and 7) core.js:746 should be already fixed by @gberaudo via #82
from ol-cesium.
I grabbed the latest ol3-cesium code and have a few more compiler errors:
- core.js:805: csPrimitive doesn't exist on
ol.Feature
. - vectorsynchronizer.js:100: csPrimitive doesn't exist on
ol.Feature
.
I added a note in #88 as well.
from ol-cesium.
See openlayers/openlayers#2785 for the change in the generated externs file. @petrsloup and @gberaudo, please test and let me know if the goog.events.Key issue is fixed.
from ol-cesium.
@gberaudo last comment from @schmidtk on #88 is related to the code you created here. It has been only moved during refactoring. Could you please check this?
from ol-cesium.
@gberaudo Can you please take another look at this? Especially if the externs file generated after openlayers/openlayers#2785 is correct, and if the problem pointed out in #88 is addressed here. Thanks.
from ol-cesium.
Hi @ahocevar, the problem pointed out in #88 was (tentatively) addressed
in #95.
See comment
#95 (comment).
A make check
using your ol3 branch prints the following olcs compile error:
ERR! compile /home/gberaudo/dev/ol3-cesium/src/camera.js:105: ERROR -
actual parameter 1 of ol.View.prototype.unByKey does not match formal
parameter
ERR! compile found : *
ERR! compile required: (goog.events.ListenableKey|null|number)
ERR! compile this.view_.unByKey(this.viewListenKey_);
ERR! compile ^
ERR! compile
ERR! compile
ERR! compile 1 error(s), 0 warning(s), 96,4% typed
ERR! compile
ERR! Process exited with non-zero status, see log for more detail: 1
from ol-cesium.
Thanks for testing @gberaudo. See #97 for a fix.
from ol-cesium.
@elemoine or @fredj, can you please review openlayers/openlayers#2785? Then we can close this.
from ol-cesium.
Thanks to everyone who helped with this. Closing 😄.
from ol-cesium.
Related Issues (20)
- Help loader problem HOT 3
- ImageStatic projection with EPSG:3857 show black screen HOT 3
- Use ol-cesium in an angular library HOT 1
- Container is not hidden initially
- Vector tile layers not visible on the Cesium map
- readyPromise deprecated in Cesium. It will be removed in 1.107. HOT 1
- Add minimumLevel option for WMS layers HOT 3
- 3DTiles not displayed HOT 1
- Is there support for multiple coordinate systems other than EPSG:4326 and EPSG:4327 HOT 2
- Rework OLCesium class to use the Cesium engine widget
- Npm version 2.16.1 HOT 3
- Adding support for MVT source using WMS protocols HOT 2
- `SynchronizedOverlay#handlePositionChanged` is called after overlay is destroyed HOT 2
- build-library is missing in 2.18 HOT 1
- `this.parent_` is undefined in `SynchronizedOverlay#handlePositionChanged`
- altitudeMode: "clampToGround" HOT 3
- olcs.FeatureConverter is not a constructor HOT 5
- OLCesium destroy function doesn't remove all listeners HOT 1
- how to use this plugin HOT 3
- Resolving 'Cesium is not Defined' Error in OL 6 with OLCS Using TypeScript HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ol-cesium.