fix:修改地图addlayer,修改小车刷新频率

This commit is contained in:
SunTao 2025-01-02 11:23:59 +08:00
parent 09e68c12fa
commit 172c2501cb
3 changed files with 17 additions and 14 deletions

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23 * @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-26 10:02:28 * @LastEditTime: 2025-01-02 10:33:02
* @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue * @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
* @Description: 公共地图 * @Description: 公共地图
--> -->
@ -335,7 +335,9 @@ export default {
}), }),
visible: true, visible: true,
}); });
map.addLayer(tianditu_cva_c, tianditu_vec_c, tianditu_img_c); map.addLayer(tianditu_cva_c);
map.addLayer(tianditu_vec_c);
map.addLayer(tianditu_img_c);
} else { } else {
// //
tianditu_cva_c = new TileLayer({ tianditu_cva_c = new TileLayer({
@ -348,7 +350,8 @@ export default {
}), }),
visible: true, visible: true,
}); });
map.addLayer(tianditu_cva_c, tianditu_img_c); map.addLayer(tianditu_cva_c);
map.addLayer(tianditu_img_c);
} }
// //
map.on("singleclick", (e) => { map.on("singleclick", (e) => {

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 11:34:00 * @Date: 2024-10-17 11:34:00
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-31 11:35:20 * @LastEditTime: 2025-01-02 10:37:46
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页 * @Description: 大屏首页
--> -->
@ -1594,14 +1594,14 @@ export default {
const currentLocation = item.getGeometry().getCoordinates(); const currentLocation = item.getGeometry().getCoordinates();
const targetLocation = itemMessage.data.location; const targetLocation = itemMessage.data.location;
// //
const dx = (targetLocation[0] * 1 - currentLocation[0] * 1) / 100; const dx = (targetLocation[0] * 1 - currentLocation[0] * 1) / 20;
const dy = (targetLocation[1] * 1 - currentLocation[1] * 1) / 100; const dy = (targetLocation[1] * 1 - currentLocation[1] * 1) / 20;
// //
let count = 0; let count = 0;
// ,10ms,100,1 // ,50ms,20,1
const timer = setInterval(() => { const timer = setInterval(() => {
count++; count++;
if (count >= 100) { if (count >= 20) {
clearInterval(timer); clearInterval(timer);
return; return;
} }
@ -1626,7 +1626,7 @@ export default {
}), }),
}), }),
]); ]);
}, 10); }, 50);
} }
}); });
} else { } else {

View File

@ -67,15 +67,15 @@ export default {
const targetLocation = itemMessage.data.location; const targetLocation = itemMessage.data.location;
// //
const dx = const dx =
(targetLocation[0] * 1 - currentLocation[0] * 1) / 100; (targetLocation[0] * 1 - currentLocation[0] * 1) / 20;
const dy = const dy =
(targetLocation[1] * 1 - currentLocation[1] * 1) / 100; (targetLocation[1] * 1 - currentLocation[1] * 1) / 20;
// //
let count = 0; let count = 0;
// ,10ms,100,1 // ,50ms,20,1
const timer = setInterval(() => { const timer = setInterval(() => {
count++; count++;
if (count >= 100) { if (count >= 20) {
clearInterval(timer); clearInterval(timer);
return; return;
} }
@ -100,7 +100,7 @@ export default {
}), }),
}), }),
]); ]);
}, 10); }, 50);
} }
}); });
} else { } else {