Skip to content

Commit 73ef91a

Browse files
committed
【bug】1) 解决分享页面,dataflow未配置字段的情况下,不显示
(reviewed by chengl)
1 parent f554b22 commit 73ef91a

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,28 +1581,12 @@ export class WebMap extends Observable {
15811581
}).then(function (response) {
15821582
return response.json()
15831583
}).then(function (result) {
1584+
layerInfo.featureType="POINT";
15841585
if(result && result.featureMetaData) {
15851586
layerInfo.featureType = result.featureMetaData.featureType.toUpperCase();
1586-
layerInfo.dataSource={dataTypes:{}};
1587-
if(result.featureMetaData.fieldInfos && result.featureMetaData.fieldInfos.length > 0) {
1588-
result.featureMetaData.fieldInfos.forEach(function (data) {
1589-
let name = data.name.trim();
1590-
if(data.type === 'TEXT') {
1591-
layerInfo.dataSource.dataTypes[name] = "STRING";
1592-
} else if(['DOUBLE','INT','FLOAT','LONG','SHORT'].includes(data.type)) {
1593-
layerInfo.dataSource.dataTypes[name] = "NUMBER";
1594-
} else {
1595-
layerInfo.dataSource.dataTypes[name] = "UNKNOWN";
1596-
}
1597-
})
1598-
}
1599-
layerInfo.wsUrl = result.urls[0].url;
1600-
layerInfo.name = result.urls[0].url.split('iserver/services/')[1].split('/dataflow')[0];
1601-
success();
1602-
} else {
1603-
//失败也要到成功会调函数中,否则不会继续执行
1604-
faild();
1605-
}
1587+
}
1588+
layerInfo.wsUrl = result.urls[0].url;
1589+
success();
16061590
}).catch(function () {
16071591
faild();
16081592
});

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