@@ -320,7 +320,7 @@ export class VectorTileSuperMapRest extends VectorTile {
320320 this . baseUrl = url ;
321321 style = await response . json ( ) ;
322322 }
323- await this . _fillByStyleJSON ( style , options . source ) ;
323+ await this . _fillByStyleJSON ( style , options ) ;
324324 } else {
325325 this . _fillByRestMapOptions ( options . url , options ) ;
326326 }
@@ -332,7 +332,8 @@ export class VectorTileSuperMapRest extends VectorTile {
332332 }
333333 }
334334
335- async _fillByStyleJSON ( style , source ) {
335+ async _fillByStyleJSON ( style , options ) {
336+ let { source, withCredentials } = options
336337 if ( ! source ) {
337338 source = Object . keys ( style . sources ) [ 0 ] ;
338339 }
@@ -353,7 +354,7 @@ export class VectorTileSuperMapRest extends VectorTile {
353354 if ( ! CommonUtil . isAbsoluteURL ( tiles ) ) {
354355 tiles = CommonUtil . relative2absolute ( tiles , this . baseUrl ) ;
355356 }
356- const response = await FetchRequest . get ( tiles , { } , { withoutFormatSuffix : true } ) ;
357+ const response = await FetchRequest . get ( tiles , { } , { withCredentials , withoutFormatSuffix : true } ) ;
357358 const sourceInfo = await response . json ( ) ;
358359 let tileUrl = sourceInfo . tiles [ 0 ] ;
359360 if ( ! CommonUtil . isAbsoluteURL ( tileUrl ) ) {
0 commit comments