reearth / resium

React components for 🌏 Cesium
https://resium.reearth.io
MIT License
704 stars 130 forks source link

ImageryLayer readonly imageryProvider prop #664

Closed TheMrCam closed 1 week ago

TheMrCam commented 3 weeks ago

Overview

The Resium docs and Cesium docs agree that ImageryLayer#imageryProvider is a readonly property. It appears that Resium does not accurately respect that, and as a result the ImageryLayer isn't being recreated on prop change.

Is this an issue?

I primarily wanted to make this issue to ask permission to create a small PR that remedies the problem by moving 'imageryProvider' from otherProps to cesiumReadonlyProps, as I already have and use this as a custom Resium component downstream.

However, there's entirely a chance that I'm actually missing something or doing something slightly incorrectly, in which case I wouldn't want to introduce any changes to Resium that would affect other developers.