feat(web-ui): 添加历史轨迹功能与地图适配
- 在 web-ui 中新增历史轨迹查询与回放功能,允许用户查看历史数据。 - 更新 map-loader.js 和 history-map-adapter.js,支持历史轨迹的地图渲染与交互。 - 修改 CSS 文件以改善历史轨迹界面的样式,确保在不同主题下的视觉一致性。 - 在 receivers.js 中更新接收机配置,支持 UID 身份隔离与状态显示优化。 - 在 map_settings.rs 中设置默认经纬度,提升地图初始化体验。
This commit is contained in:
@@ -15,4 +15,13 @@ window.ridGeofences={
|
||||
close(){fenceGeneration++;fences?.close();},render(p){fences?.render(p);},targets(p){fences?.targets(p);},tool(v){fences?.tool(v);},locate(){fences?.locate();},setBasemap(v){fences?.setBasemap(v);},metrics(){return fences?.metrics();}
|
||||
};
|
||||
|
||||
let history,historyGeneration=0,historyPoints=[],historyIndex=0;
|
||||
window.ridHistory={
|
||||
async open(p){const token=++historyGeneration;try{history??=await import('./history-map-adapter.js');if(token===historyGeneration){history.open(p);history.setPoints(historyPoints);history.setIndex(historyIndex);}}catch{window.dispatchEvent(new Event('rid-history-map-error'));}},
|
||||
close(){historyGeneration++;history?.close();},
|
||||
setPoints(value){historyPoints=Array.isArray(value)?value:[];historyIndex=0;history?.setPoints(historyPoints);},
|
||||
setIndex(value){historyIndex=value;history?.setIndex(value);},
|
||||
metrics(){return history?.metrics();}
|
||||
};
|
||||
|
||||
if (location.pathname === '/realtime') await import('./map-adapter.js');
|
||||
|
||||
Reference in New Issue
Block a user