@@ -1585,7 +1585,7 @@ export class WebMap extends Observable {
1585
1585
getWmtsInfo ( layerInfo , callback ) {
1586
1586
let that = this ;
1587
1587
let options = {
1588
- withCredentials : that . isCredentail ( layerInfo . proxy ) ,
1588
+ withCredentials : that . isCredentail ( layerInfo . url , layerInfo . proxy ) ,
1589
1589
withoutFormatSuffix : true
1590
1590
} ;
1591
1591
const isKvp = ! layerInfo . requestEncoding || layerInfo . requestEncoding === 'KVP' ;
@@ -4850,9 +4850,9 @@ export class WebMap extends Observable {
4850
4850
url = this . getRequestUrl ( url + '.json' ) ;
4851
4851
}
4852
4852
if ( url . indexOf ( '/restjsr/' ) > - 1 && ! / \. j s o n $ / . test ( url ) ) {
4853
- url = this . getRequestUrl ( url + '.json' ) ;
4853
+ url = this . getRequestUrl ( url + '.json' , layerInfo . proxy ) ;
4854
4854
} else {
4855
- url = this . getRequestUrl ( url ) ;
4855
+ url = this . getRequestUrl ( url , layerInfo . proxy ) ;
4856
4856
}
4857
4857
4858
4858
let credential = layerInfo . credential ;
@@ -4865,7 +4865,7 @@ export class WebMap extends Observable {
4865
4865
}
4866
4866
4867
4867
return FetchRequest . get ( url , null , {
4868
- withCredentials : this . isCredentail ( url ) ,
4868
+ withCredentials : this . isCredentail ( url , layerInfo . proxy ) ,
4869
4869
withoutFormatSuffix : true ,
4870
4870
headers : {
4871
4871
'Content-Type' : 'application/json;chartset=uft-8'
@@ -4916,7 +4916,7 @@ export class WebMap extends Observable {
4916
4916
if ( styleUrl . indexOf ( '/restjsr/' ) > - 1 && ! / \/ s t y l e \. j s o n $ / . test ( url ) ) {
4917
4917
styleUrl = `${ styleUrl } /style.json` ;
4918
4918
}
4919
- styleUrl = this . getRequestUrl ( styleUrl ) ;
4919
+ styleUrl = this . getRequestUrl ( styleUrl , layerInfo . proxy ) ;
4920
4920
let credential = layerInfo . credential ;
4921
4921
//携带令牌(restmap用的首字母大写,但是这里要用小写)
4922
4922
let credentialValue , keyfix ;
@@ -4927,7 +4927,7 @@ export class WebMap extends Observable {
4927
4927
}
4928
4928
4929
4929
return FetchRequest . get ( styleUrl , null , {
4930
- withCredentials : this . isCredentail ( styleUrl ) ,
4930
+ withCredentials : this . isCredentail ( styleUrl , layerInfo . proxy ) ,
4931
4931
withoutFormatSuffix : true ,
4932
4932
headers : {
4933
4933
'Content-Type' : 'application/json;chartset=uft-8'
0 commit comments