Skip to content

Commit 2917ebe

Browse files
committed
【update】1) webMap中shp数据类型,对接iportal的content.json接口
(reviewed by chengl)
1 parent 8cd3560 commit 2917ebe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,6 @@ export class WebMap extends Observable {
14281428
if (data.type === "JSON" || data.type === "GEOJSON") {
14291429
data.content = data.content.type ? data.content : JSON.parse(data.content);
14301430
features = that.geojsonToFeature(data.content, layer);
1431-
14321431
} else if (data.type === 'EXCEL' || data.type === 'CSV') {
14331432
if(layer.dataSource && layer.dataSource.administrativeInfo ) {
14341433
//行政规划信息
@@ -1439,6 +1438,10 @@ export class WebMap extends Observable {
14391438
} else {
14401439
features = await that.excelData2Feature(data.content, layer);
14411440
}
1441+
} else if(data.type === 'SHP') {
1442+
let content = JSON.parse(data.content);
1443+
data.content = content.layers[0];
1444+
features = that.geojsonToFeature(data.content, layer);
14421445
}
14431446
that.addLayer(layer, features, layerIndex);
14441447
that.layerAdded++;

0 commit comments

Comments
 (0)