@@ -105,13 +105,14 @@ function addGeoJSONLayer({
105105
106106// Add a Tile ArcGIS MapServer layer to the map.
107107function addTileArcGISMapServerLayer ( {
108- title = 'arcgis-tile' , url, params, visible = true , base = false , attribution = '' ,
108+ title = 'arcgis-tile' , url, params, visible = true , base = false , attribution = '' , crossOrigin = null ,
109109} ) {
110110 const attributions = [ attribution ] ;
111111 const source = new TileArcGISRest ( {
112112 url,
113113 params,
114114 attributions,
115+ crossOrigin,
115116 } ) ;
116117 const layer = new TileLayer ( {
117118 title,
@@ -146,13 +147,14 @@ function addWKTLayer({
146147
147148// Add a WMS tile layer to the map.
148149function addWMSTileLayer ( {
149- title = 'wms' , url, params, visible = true , base = false , attribution = '' ,
150+ title = 'wms' , url, params, visible = true , base = false , attribution = '' , crossOrigin = null ,
150151} ) {
151152 const attributions = [ attribution ] ;
152153 const source = new TileWMS ( {
153154 url,
154155 params,
155156 attributions,
157+ crossOrigin,
156158 } ) ;
157159 const layer = new TileLayer ( {
158160 title,
@@ -165,13 +167,14 @@ function addWMSTileLayer({
165167
166168// Add an XYZ tile layer to the map.
167169function addXYZTileLayer ( {
168- title = 'xyz' , url, tileSize = 256 , visible = true , base = false , attribution = '' ,
170+ title = 'xyz' , url, tileSize = 256 , visible = true , base = false , attribution = '' , crossOrigin = null ,
169171} ) {
170172 const attributions = [ attribution ] ;
171173 const source = new XYZ ( {
172174 url,
173175 tileSize,
174176 attributions,
177+ crossOrigin,
175178 } ) ;
176179 const layer = new TileLayer ( {
177180 title,
0 commit comments