File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,31 @@ class SHOGunApplicationUtil<
283283 }
284284
285285 if ( layer . type === 'WMTS' ) {
286- return await this . parseWMTSLayer ( layer , projection ) ;
286+ try {
287+ return await this . parseWMTSLayer ( layer , projection ) ;
288+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
289+ } catch ( error ) {
290+ const wmtsSource = new OlSourceWMTS ( {
291+ layer : layer ?. sourceConfig ?. layerNames ,
292+ matrixSet : 'dummyMatrixSet' ,
293+ style : 'dummyStyle' ,
294+ tileGrid : new OlTileGridWMTS ( {
295+ matrixIds : [ ] ,
296+ resolutions : [ ] ,
297+ origin : [ 0 , 0 ]
298+ } )
299+ } ) ;
300+
301+ const dummyLayer = new OlTileLayer ( {
302+ source : wmtsSource
303+ } ) ;
304+
305+ this . setLayerProperties ( dummyLayer , layer ) ;
306+
307+ Logger . warn ( 'Returning dummy WMTS layer as capabilities could not be requested.' ) ;
308+
309+ return dummyLayer ;
310+ }
287311 }
288312
289313 if ( layer . type === 'WFS' ) {
You can’t perform that action at this time.
0 commit comments