Skip to content

Commit 075134c

Browse files
committed
[bug] 修复合并后自测的缺陷
1. WMTS出图失败 2. 请求RestMap地址未勾选代理,但是请求带了代理地址
1 parent 1580610 commit 075134c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ export class WebMap extends Observable {
15851585
getWmtsInfo(layerInfo, callback) {
15861586
let that = this;
15871587
let options = {
1588-
withCredentials: that.isCredentail(layerInfo.proxy),
1588+
withCredentials: that.isCredentail(layerInfo.url, layerInfo.proxy),
15891589
withoutFormatSuffix: true
15901590
};
15911591
const isKvp = !layerInfo.requestEncoding || layerInfo.requestEncoding === 'KVP';
@@ -4850,9 +4850,9 @@ export class WebMap extends Observable {
48504850
url = this.getRequestUrl(url + '.json');
48514851
}
48524852
if (url.indexOf('/restjsr/') > -1 && !/\.json$/.test(url)) {
4853-
url = this.getRequestUrl(url + '.json');
4853+
url = this.getRequestUrl(url + '.json', layerInfo.proxy);
48544854
} else {
4855-
url = this.getRequestUrl(url);
4855+
url = this.getRequestUrl(url, layerInfo.proxy);
48564856
}
48574857

48584858
let credential = layerInfo.credential;
@@ -4865,7 +4865,7 @@ export class WebMap extends Observable {
48654865
}
48664866

48674867
return FetchRequest.get(url, null, {
4868-
withCredentials: this.isCredentail(url),
4868+
withCredentials: this.isCredentail(url, layerInfo.proxy),
48694869
withoutFormatSuffix: true,
48704870
headers: {
48714871
'Content-Type': 'application/json;chartset=uft-8'
@@ -4916,7 +4916,7 @@ export class WebMap extends Observable {
49164916
if (styleUrl.indexOf('/restjsr/') > -1 && !/\/style\.json$/.test(url)) {
49174917
styleUrl = `${styleUrl}/style.json`;
49184918
}
4919-
styleUrl = this.getRequestUrl(styleUrl);
4919+
styleUrl = this.getRequestUrl(styleUrl, layerInfo.proxy);
49204920
let credential = layerInfo.credential;
49214921
//携带令牌(restmap用的首字母大写,但是这里要用小写)
49224922
let credentialValue, keyfix;
@@ -4927,7 +4927,7 @@ export class WebMap extends Observable {
49274927
}
49284928

49294929
return FetchRequest.get(styleUrl, null, {
4930-
withCredentials: this.isCredentail(styleUrl),
4930+
withCredentials: this.isCredentail(styleUrl, layerInfo.proxy),
49314931
withoutFormatSuffix: true,
49324932
headers: {
49334933
'Content-Type': 'application/json;chartset=uft-8'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy