feat(web-ui): 添加历史轨迹功能与地图适配
- 在 web-ui 中新增历史轨迹查询与回放功能,允许用户查看历史数据。 - 更新 map-loader.js 和 history-map-adapter.js,支持历史轨迹的地图渲染与交互。 - 修改 CSS 文件以改善历史轨迹界面的样式,确保在不同主题下的视觉一致性。 - 在 receivers.js 中更新接收机配置,支持 UID 身份隔离与状态显示优化。 - 在 map_settings.rs 中设置默认经纬度,提升地图初始化体验。
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub const MAX_DOWNLOAD_TILES: u64 = 20_000;
|
||||
pub const DEFAULT_LONGITUDE: f64 = 118.778863;
|
||||
pub const DEFAULT_LATITUDE: f64 = 32.043828;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
||||
@@ -60,8 +62,8 @@ impl Default for Preferences {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
basemap: "imagery".into(),
|
||||
longitude: 120.1538,
|
||||
latitude: 30.2874,
|
||||
longitude: DEFAULT_LONGITUDE,
|
||||
latitude: DEFAULT_LATITUDE,
|
||||
zoom: 15.0,
|
||||
regions: vec![],
|
||||
revision: 0,
|
||||
@@ -163,6 +165,10 @@ mod tests {
|
||||
fn validates_defaults_and_regions() {
|
||||
let mut p = Preferences::default();
|
||||
assert!(p.valid());
|
||||
assert_eq!(
|
||||
(p.longitude, p.latitude),
|
||||
(DEFAULT_LONGITUDE, DEFAULT_LATITUDE)
|
||||
);
|
||||
p.latitude = 90.0;
|
||||
assert!(!p.valid());
|
||||
p.latitude = 30.0;
|
||||
|
||||
Reference in New Issue
Block a user