北京经济技术开发区经开区虚拟城市项目-【前端】-Web
Jin Lei
2023-12-23 bcf90ed7770542ec3dd51c1bfba544e26b5e0ce3
[信令]信令网格删除修复
已修改2个文件
8 ■■■■■ 文件已修改
src/components/menu/signalling.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/Signalling/js/DataGrid.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/signalling.vue
@@ -178,6 +178,7 @@
                dataDraw();
            } else if (val == "柱状") {
                setDataRenderVisible(false);
                removeGrid();
                dataGrid(true);
            } else if (val == "网格") {
                setDataRenderVisible(false);
static/Signalling/js/DataGrid.js
@@ -6,7 +6,7 @@
    let y = positions[id][1];
    let value = signallingData.values[signallingData.selectid][id];
    let color = signallingData.color.getColor(value);
    let entity = viewer.entities.add({
    let entity = signallingData.dataSource.entities.add({
        id: "box_" + id,
        position: Cesium.Cartesian3.fromDegrees(x, y, value * 1.5),
        box: {
@@ -15,7 +15,7 @@
            material: color,
        }
    });
    viewer.entities.add({
    signallingData.dataSource.entities.add({
        id: "label_" + id,
        position: Cesium.Cartesian3.fromDegrees(x, y, value * 3),
        label: {
@@ -95,7 +95,8 @@
}
function removeGrid() {
    try {
        viewer.dataSources.remove(signallingData.dataSource);
        viewer.dataSources.remove(signallingData.dataSource,true);
        signallingData.dataSource = null;
    } catch (e) { }
    return true;