@@ -218,8 +218,12 @@
const createCanvas = id => {
let canvas = document.createElement('canvas');
canvas.id = 'canvas' + id;
- canvas.style.display = 'none';
- document.body.append(canvas);
+ canvas.style.height = '110%';
+ canvas.style.width = '110%';
+ canvas.style.position = 'relative';
+ canvas.style.top = '-17px';
+ //canvas.style.display = 'none';
+ document.getElementById('rainend').append(canvas);
return canvas;
};
@@ -295,10 +299,11 @@
canvas = createCanvas(0);
plotInit(colorScale);
- createCanvasLayer(canvas.id, 0, [109.36903069276376, 36.53005543707354, 109.62694602722712, 36.7105574823517]);
setRainImage(0);
- newfiberMapbox_table.map.setZoom(10);
- newfiberMapbox_table.map.setPitch(50);
+ //createCanvasLayer(canvas.id, 0, [109.36903069276376, 36.53005543707354, 109.62694602722712, 36.7105574823517]);
+ setRainImage(0);
+ // newfiberMapbox_table.map.setZoom(10);
+ // newfiberMapbox_table.map.setPitch(50);
// let i = 0;
// let interval = setInterval(() => {
// if (i >= imageFiles.length) i = 0;
@@ -317,6 +322,8 @@
onBeforeUnmount(() => {
bus.emit('setLayerVisible', { layername: 'fengXianPoint', isCheck: false });
bus.emit('setLayerVisible', { layername: 'yiLaoPoint', isCheck: false });
+ var canvas = document.getElementById('canvas0');
+ canvas.remove();
});
@@ -503,7 +510,7 @@
.rainend {
width: 440px;
height: 85%;
- // background: url('@/assets/images/zhps/hsRain.png') no-repeat;
+ background: url('@/assets/images/zhps/hsRain.png') no-repeat;
background-size: 100% 100%;
}
.rainLegend {