| | |
| | | dataDraw(); |
| | | } else if (val == "柱状") { |
| | | setDataRenderVisible(false); |
| | | removeGrid(); |
| | | dataGrid(true); |
| | | } else if (val == "网格") { |
| | | setDataRenderVisible(false); |
| | |
| | | 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: { |
| | |
| | | material: color, |
| | | } |
| | | }); |
| | | viewer.entities.add({ |
| | | signallingData.dataSource.entities.add({ |
| | | id: "label_" + id, |
| | | position: Cesium.Cartesian3.fromDegrees(x, y, value * 3), |
| | | label: { |
| | |
| | | } |
| | | function removeGrid() { |
| | | try { |
| | | viewer.dataSources.remove(signallingData.dataSource); |
| | | viewer.dataSources.remove(signallingData.dataSource,true); |
| | | |
| | | signallingData.dataSource = null; |
| | | } catch (e) { } |
| | | return true; |