diff --git a/src/layer/RLayerTileWMS.tsx b/src/layer/RLayerTileWMS.tsx index 2f0da68e..20ba47d5 100644 --- a/src/layer/RLayerTileWMS.tsx +++ b/src/layer/RLayerTileWMS.tsx @@ -42,4 +42,17 @@ export default class RLayerTileWMS extends RLayerRaster { this.ol.setSource(this.source); this.attachOldEventHandlers(this.source); } + + componentDidUpdate( + prevProps: Readonly, + prev: Readonly, + snap: unknown + ): void { + for (const prop of ['params', 'url', 'projection']) { + if (this.props[prop] !== prevProps[prop]) { + super.componentDidUpdate(prevProps, prev, snap); + return; + } + } + } }