Files
frontend-miniapp/static/sgs-map-sdk/CHANGELOG.md

22 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# SGS Map SDK Changelog
## [2.0.0] - 2026-06-12
### 🚀 新特性 (New Features)
- **双域双向通信架构**:采用不可见 iframe 挂载基座,通过安全沙箱和 `postMessage` 握手进行通信,从源头上解决 WebGL Context 内存泄漏和生命周期挂起问题。
- **动态点位系统 (Markers API)**:新增 `addMarker` / `removeMarker` / `clearMarkers` 接口,支持锚定三维节点(防模型漂移)和绝对坐标系定位。
- **异步寻路确权系统**`planRoute``changeFloor` 升级为基于 `requestId` 的 Promise 异步确权模式,支持 Timeout 拦截机制。
- **高精模型与坐标系重构**:全面接入米级统一坐标系(废弃 CAD 毫米系),支持多楼层分层物理拆分加载。
### 🐞 修复与强化 (Fixes & Improvements)
- `HELLLO``ENGINE_READY` 双向握手协议对齐。
- `targetOrigin` 自动推导增强,严格拦截非法的跨域源消息,免疫跨站攻击。
- SDK Iframe 生命周期的 `onerror` 捕捉增强,能正确派发 `loadError` 事件。
- 补齐了丢失的 `floorChanged` 运行时事件透传。
- 完善 `package.json` 工程化暴露,同时提供 IIFE 与 ESM 产物开启源码映射SourceMap
- `addMarker` 接口强制引入强类型定义 `MarkerConfig`
### 🗑️ 废弃与移除 (Deprecations)
- 彻底移除半成品接口 `startNavigateAnim` / `stopNavigateAnim`
- 彻底移除废弃接口 `addBusinessMarker` / `removeBusinessMarker`,统一收编为 `addMarker`