Skip to content

Commit cf92dae

Browse files
author
ChenGuanglin
committed
【bug】迁徙图打开失败,原因是找不到layerInfo.xyField字段
review by zhaoq
1 parent b9e5d5d commit cf92dae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,9 +1447,10 @@ export class WebMap extends ol.Observable {
14471447
colTitles[i] = Util.trim(colTitles[i]);
14481448
}
14491449
}
1450+
// 迁徙图xyField暂时用from中的
14501451
let fileCode = layerInfo.projection,
1451-
xIdx = colTitles.indexOf(Util.trim(layerInfo.xyField.xField)),
1452-
yIdx = colTitles.indexOf(Util.trim(layerInfo.xyField.yField)),
1452+
xIdx = colTitles.indexOf(Util.trim((layerInfo.xyField && layerInfo.xyField.xField) || (layerInfo.from && layerInfo.from.xField))),
1453+
yIdx = colTitles.indexOf(Util.trim((layerInfo.xyField && layerInfo.xyField.yField) || (layerInfo.from && layerInfo.from.yField))),
14531454
baseLayerEpsgCode = this.baseProjection,
14541455
features = [];
14551456

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