i am playing around with cesium and i am trying to swap the image of a SingleTileImageryProvider efficiently. I was able to do this right now by removing the layer, swapping the image and re-adding the provider to the scene. Basically like this:
imgprov._image = new_image;
templayer = scene.imageryLayers.addImageryProvider(imgprov);
This works fine in principle but it seems to take very roughly around 300ms on my machine.
Is there a way to set the state of the layer or imagery provider in order to refresh the image cache or texture (not exactly sure how this is handled) without having to remove and re-add it? Or any direct way to refresh? (Even if it is a little hacky and not really intended)
Any help would be greatly appreciated!
Thanks in advance!