@@ -1584,7 +1584,7 @@ export class WebMap extends Observable {
1584
1584
getWmtsInfo ( layerInfo , callback ) {
1585
1585
let that = this ;
1586
1586
let options = {
1587
- withCredentials : that . isCredentail ( layerInfo . proxy ) ,
1587
+ withCredentials : that . isCredentail ( layerInfo . url , layerInfo . proxy ) ,
1588
1588
withoutFormatSuffix : true
1589
1589
} ;
1590
1590
const isKvp = ! layerInfo . requestEncoding || layerInfo . requestEncoding === 'KVP' ;
@@ -4892,9 +4892,9 @@ export class WebMap extends Observable {
4892
4892
url = this . getRequestUrl ( url + '.json' ) ;
4893
4893
}
4894
4894
if ( url . indexOf ( '/restjsr/' ) > - 1 && ! / \. j s o n $ / . test ( url ) ) {
4895
- url = this . getRequestUrl ( url + '.json' ) ;
4895
+ url = this . getRequestUrl ( url + '.json' , layerInfo . proxy ) ;
4896
4896
} else {
4897
- url = this . getRequestUrl ( url ) ;
4897
+ url = this . getRequestUrl ( url , layerInfo . proxy ) ;
4898
4898
}
4899
4899
4900
4900
let credential = layerInfo . credential ;
@@ -4907,7 +4907,7 @@ export class WebMap extends Observable {
4907
4907
}
4908
4908
4909
4909
return FetchRequest . get ( url , null , {
4910
- withCredentials : this . isCredentail ( url ) ,
4910
+ withCredentials : this . isCredentail ( url , layerInfo . proxy ) ,
4911
4911
withoutFormatSuffix : true ,
4912
4912
headers : {
4913
4913
'Content-Type' : 'application/json;chartset=uft-8'
@@ -4958,7 +4958,7 @@ export class WebMap extends Observable {
4958
4958
if ( styleUrl . indexOf ( '/restjsr/' ) > - 1 && ! / \/ s t y l e \. j s o n $ / . test ( url ) ) {
4959
4959
styleUrl = `${ styleUrl } /style.json` ;
4960
4960
}
4961
- styleUrl = this . getRequestUrl ( styleUrl ) ;
4961
+ styleUrl = this . getRequestUrl ( styleUrl , layerInfo . proxy ) ;
4962
4962
let credential = layerInfo . credential ;
4963
4963
//携带令牌(restmap用的首字母大写,但是这里要用小写)
4964
4964
let credentialValue , keyfix ;
@@ -4969,7 +4969,7 @@ export class WebMap extends Observable {
4969
4969
}
4970
4970
4971
4971
return FetchRequest . get ( styleUrl , null , {
4972
- withCredentials : this . isCredentail ( styleUrl ) ,
4972
+ withCredentials : this . isCredentail ( styleUrl , layerInfo . proxy ) ,
4973
4973
withoutFormatSuffix : true ,
4974
4974
headers : {
4975
4975
'Content-Type' : 'application/json;chartset=uft-8'
0 commit comments