From 1014ba1dcbe1e0b5d49c02db9a66429bbe88c245 Mon Sep 17 00:00:00 2001 From: Evandro Antonio da Costa de Paula Date: Mon, 22 Apr 2024 13:14:31 -0300 Subject: [PATCH] improvements for RLayerTileWMSProps --- src/layer/RLayerTileWMS.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/layer/RLayerTileWMS.tsx b/src/layer/RLayerTileWMS.tsx index 2f0da68e..12ae5335 100644 --- a/src/layer/RLayerTileWMS.tsx +++ b/src/layer/RLayerTileWMS.tsx @@ -12,6 +12,7 @@ import {default as RLayerRaster, RLayerRasterProps} from './RLayerRaster'; export interface RLayerTileWMSProps extends RLayerRasterProps { params?: Record; url: string; + crossOrigin?: string; } /** @@ -29,8 +30,8 @@ export default class RLayerTileWMS extends RLayerRaster { } protected createSource(): void { - const {params, url, projection} = this.props; - const options = {params, url, projection}; + const {params, url, crossOrigin, projection} = this.props; + const options = {params, url, crossOrigin, projection}; this.source = new TileWMS(options); this.eventSources = [this.ol, this.source];