qinbo
2021-11-10 26c2f1b9194e3df6a6c1c8e337ca5f48b2cbcae5
勾选显示bug fix
1个文件已修改
24 ■■■■■ 已修改文件
widgetsTS/widget_summary/widget.js 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_summary/widget.js
@@ -97,12 +97,30 @@
                selectedItem.forEach(element => {
                    var path = element.shape;
                    if (path != null && path != "null" && path != undefined) {
                        var positions = getPositionFromLonLat(path.substring(9, path.length - 2))
                    if(path == null && path == "null" && path == undefined){
                        return;
                    }
                    if (path.substring(0, 1) == "M") {
                        var paths = (path.substring(15, path.length - 3)).split(")),((");
                        paths.forEach(element_path => {
                            var positions = getPositionFromLonLat(element_path)
                            var tmpAttr = deepCopy(element);
                            delete tmpAttr['shape'];
                            this.addPolygonToMap(layerid, qindex, positions, tmpAttr);
                        });
                    } else {
                        var positions = getPositionFromLonLat(path.substring(9, path.length - 2));
                        var tmpAttr = deepCopy(element);
                        delete tmpAttr['shape'];
                        this.addPolygonToMap(layerid, qindex, positions, tmpAttr);
                    }
                    }
                    // if (path != null && path != "null" && path != undefined) {
                    //     var positions = getPositionFromLonLat(path.substring(9, path.length - 2))
                    //     var tmpAttr = deepCopy(element);
                    //     delete tmpAttr['shape'];
                    //     this.addPolygonToMap(layerid, qindex, positions, tmpAttr);
                    // }
                });
            }