Skip to content

Commit 62c5519

Browse files
committed
【update】1) tileFormat可以支持大小写忽略
2) restData不支持0,-1,-1000添加 (reviewed by chengl)
1 parent 8c3c287 commit 62c5519

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export class WebMap extends Observable {
119119
this.layers = [];
120120
this.events = new Events(this, null, ["updateDataflowFeature"], true);
121121
this.webMap = options.webMap;
122-
this.tileFormat = options.tileFormat;
122+
this.tileFormat = options.tileFormat && options.tileFormat.toLowerCase();
123123
this.createMap(options.mapSetting);
124124
if (this.webMap) {
125125
// webmap有可能是url地址,有可能是webmap对象
@@ -1262,7 +1262,7 @@ export class WebMap extends Observable {
12621262
return result
12631263
}
12641264
let format = 'png';
1265-
if(that.tileFormat === 'WebP') {
1265+
if(that.tileFormat === 'webp') {
12661266
const isSupportWebp = await that.isSupportWebp(layerInfo.url, token);
12671267
format = isSupportWebp ? 'webp' : 'png';
12681268
}
@@ -1318,7 +1318,7 @@ export class WebMap extends Observable {
13181318
let token = layerInfo.credential ? layerInfo.credential.token : undefined;
13191319
layerInfo.format = 'png';
13201320
// china_dark为默认底图,还是用png出图
1321-
if(that.tileFormat === 'WebP' && layerInfo.url !== 'https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark') {
1321+
if(that.tileFormat === 'webp' && layerInfo.url !== 'https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark') {
13221322
const isSupprtWebp = await that.isSupportWebp(layerInfo.url, token);
13231323
layerInfo.format = isSupprtWebp ? 'webp' : 'png';
13241324
}
@@ -1961,6 +1961,13 @@ export class WebMap extends Observable {
19611961
if (!this.excludePortalProxyUrl && !CommonUtil.isInTheSameDomain(requestUrl)) {
19621962
serviceOptions.proxy = this.getProxy();
19631963
}
1964+
if(['EPSG:-1', 'EPSG:0', 'EPSG:-1000'].includes(layer.projection)) {
1965+
// 不支持动态投影restData服务
1966+
that.layerAdded++;
1967+
that.sendMapToUser(layerLength);
1968+
that.errorCallback && that.errorCallback({}, 'getFeatureFaild', that.map);
1969+
return;
1970+
}
19641971
//因为itest上使用的https,iserver是http,所以要加上代理
19651972
Util.getFeatureBySQL(requestUrl, [dataSourceName], serviceOptions, function (result) {
19661973
let features = that.parseGeoJsonData2Feature({

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