升级 SGS 地图 SDK 至 2.4.1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
lyf
2026-07-13 11:00:04 +08:00
parent 8e187d6d4f
commit e473b6a2a5
18 changed files with 1655 additions and 25 deletions

View File

@@ -3,6 +3,7 @@ import type {
SgsMapSDKInstance,
SgsMarkerConfig,
SgsMapNode,
SgsRouteOptions,
SgsRouteResult
} from '@/types/sgs-map-sdk'
import {
@@ -116,9 +117,9 @@ export class SgsMapService {
return this.sdk
}
async changeFloor(floorId: string | number) {
async changeFloor(floorId: string | number, options?: { forceReload?: boolean }) {
const sdk = await this.getReadySdk()
return sdk.changeFloor(floorId, this.options.timeout)
return sdk.changeFloor(floorId, this.options.timeout, options)
}
async focusTo(node: SgsMapNode | string) {
@@ -138,15 +139,15 @@ export class SgsMapService {
async resetView() {
const sdk = await this.getReadySdk()
sdk.resetView()
return sdk.resetView(this.options.timeout)
}
async setViewMode(mode: '2d' | '3d') {
const sdk = await this.getReadySdk()
sdk.setViewMode(mode)
return sdk.setViewMode(mode, this.options.timeout)
}
async planRoute(from: SgsMapNode | string, to: SgsMapNode | string, options?: unknown): Promise<SgsRouteResult> {
async planRoute(from: SgsMapNode | string, to: SgsMapNode | string, options?: SgsRouteOptions): Promise<SgsRouteResult> {
const sdk = await this.getReadySdk()
return sdk.planRoute(from, to, options, this.options.timeout)
}