Skip to content

Commit 886e78b

Browse files
committed
2 parents 9a81d00 + 080b256 commit 886e78b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ export class WebMap extends Observable {
14901490
})
14911491
}
14921492
} else if(dataSource && dataSource.type === "USER_DATA") {
1493-
that.addGeojsonFromUrl(layer, len, layerIndex);
1493+
that.addGeojsonFromUrl(layer, len, layerIndex, false);
14941494
} else if (layer.layerType === 'SUPERMAP_REST' ||
14951495
layer.layerType === "TILE" ||
14961496
layer.layerType === "WMS" ||
@@ -1555,11 +1555,13 @@ export class WebMap extends Observable {
15551555
* @param {object} layerInfo - 图层信息
15561556
* @param {Number} len - 总的图层数量
15571557
* @param {Number} layerIndex - 当前图层index
1558+
* @param {Boolean} withCredentials - 是否携带cookie
15581559
*/
1559-
addGeojsonFromUrl(layerInfo, len, layerIndex) {
1560+
addGeojsonFromUrl(layerInfo, len, layerIndex, withCredentials = this.withCredentials) {
1561+
// 通过web添加geojson不需要携带cookie
15601562
let {dataSource} = layerInfo, {url} = dataSource, that = this;
15611563
FetchRequest.get(url, null, {
1562-
withCredentials: this.withCredentials,
1564+
withCredentials,
15631565
withoutFormatSuffix: true
15641566
}).then(function (response) {
15651567
return response.json()

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