支持图源切换

This commit is contained in:
2026-06-06 01:49:05 +08:00
parent 0f9cb3eae5
commit 71282f4e4f
11 changed files with 358 additions and 7 deletions
+5
View File
@@ -33,6 +33,7 @@ import type {
NodeInfo,
PositionRecord,
PublicMapTileSourceResponse,
PublicMapTileSourcesResponse,
TelemetryRecord,
TextMessage,
} from './types'
@@ -133,6 +134,10 @@ export function getDefaultMapSource(): Promise<PublicMapTileSourceResponse> {
return getJSON<PublicMapTileSourceResponse>('/api/map-source/default')
}
export function getEnabledMapSources(): Promise<PublicMapTileSourcesResponse> {
return getJSON<PublicMapTileSourcesResponse>('/api/map-source/enabled')
}
export function getTextMessages(limit = 100, offset = 0, nodeId = ''): Promise<ListResponse<TextMessage>> {
return getJSON<ListResponse<TextMessage>>(listPath('/api/text-messages', limit, offset, nodeId))
}