-
Notifications
You must be signed in to change notification settings - Fork 327
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
Dynamically update layer source #536
Comments
I did a jsfiddle to clearly explain the problem: https://jsfiddle.net/0nkc0kwd/4/ I can see that the function is defined in olcesium: /**
* Set the layer source.
* @param {ol.source.Source} source The layer source.
* @observable
* @api
*/
ol.layer.Layer.prototype.setSource = function(source) {
this.set(ol.layer.Property.SOURCE, source);
}; My guess is that the layer is not updated on Cesium side. Maybe there should be some more code here to synchronize the layer in Cesium. |
Hello @samuel-girard, have you checked OL-Cesium registers a listener on 'change:source' on the layer? There may be missing cases. If it exists, you should check it is called. |
Hello @gberaudo The problem here is that if I add a layer with a source that is left uninitialized, and that I initialize the source later, this layer is skipped from Cesium because it was failed to be added in the first case. |
@samuel-girard, what file "olcesium.js" do you use? |
Hello,
When I add a new image layer to the map, and create the source afterwards, the new source is not displayed on the globe (but it is on OpenLayers map).
Here is the code I use:
Is there a way to tell ol-cesium that my layer was updated?
Thanks
The text was updated successfully, but these errors were encountered: