Skip to content

Commit e4308ba

Browse files
committed
[bug] wmts图层出图失败
(reviewed by ytt)
1 parent 928e7d2 commit e4308ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ export class WebMap extends Observable {
16361636
getWmtsInfo(layerInfo, callback) {
16371637
let that = this;
16381638
let options = {
1639-
withCredentials: that.isCredentail(layerInfo.proxy),
1639+
withCredentials: that.isCredentail(layerInfo.url, layerInfo.proxy),
16401640
withoutFormatSuffix: true
16411641
};
16421642
const isKvp = !layerInfo.requestEncoding || layerInfo.requestEncoding === 'KVP';
@@ -5248,7 +5248,7 @@ export class WebMap extends Observable {
52485248
if (checkUrl && !CommonUtil.isAbsoluteURL(checkUrl)) {
52495249
checkUrl = CommonUtil.relative2absolute(checkUrl, baseUrl);
52505250
}
5251-
let withCredentials = this.isCredentail(checkUrl, layerInfo.proxy);
5251+
const withCredentials = CommonUtil.isInTheSameDomain(checkUrl) || this.isIportalProxyServiceUrl(checkUrl);
52525252
const requestParameters = this.tileRequestParameters && this.tileRequestParameters(checkUrl);
52535253
// 创建MapBoxStyle样式
52545254
let mapboxStyles = new MapboxStyles({

0 commit comments

Comments
 (0)