Skip to content

Commit 27c7821

Browse files
committed
[bug] 修复ol webmap,当叠加图层数量为零时,直接成功回调,此时经纬网图层还未添加
review by zhaoq
1 parent d80ce7a commit 27c7821

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/openlayers/mapping/WebMap.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,9 @@ export class WebMap extends Observable {
345345
// 经纬网
346346
if(mapInfo.grid && mapInfo.grid.graticule) {
347347
that.createGraticuleLayer(mapInfo.grid.graticule);
348+
that.isAdded++;
349+
const lens = mapInfo.layers ? mapInfo.layers.length : 0;
350+
that.sendMapToUser(lens + 1);
348351
}
349352
} else {
350353
// 不支持的坐标系

0 commit comments

Comments
 (0)