feat: expand vehicle data platform capabilities

This commit is contained in:
lingniu
2026-07-27 16:46:15 +08:00
parent e3a1f80f86
commit 3c4bece72c
650 changed files with 62155 additions and 2552 deletions
@@ -1,6 +1,11 @@
import { getAMapConfig, isAMapConfigured } from '../config/appConfig';
export type AMapPlugin = 'AMap.Scale' | 'AMap.Geocoder' | 'AMap.ToolBar';
export type AMapPlugin = 'AMap.Scale' | 'AMap.Geocoder' | 'AMap.ToolBar' | 'AMap.MouseTool';
export type AMapLngLat = {
getLng: () => number;
getLat: () => number;
};
export type AMapMap = {
add: (overlay: AMapOverlay | AMapOverlay[]) => void;
@@ -28,6 +33,18 @@ export type AMapOverlay = {
setPath?: (path: [number, number][]) => void;
};
export type AMapCircleOverlay = AMapOverlay & {
getCenter: () => AMapLngLat;
getRadius: () => number;
};
export type AMapMouseTool = {
circle: (options?: Record<string, unknown>) => void;
close: (clear?: boolean) => void;
on: (eventName: 'draw', handler: (event: { obj?: AMapCircleOverlay }) => void) => void;
off?: (eventName: 'draw', handler: (event: { obj?: AMapCircleOverlay }) => void) => void;
};
export type AMapMassMarks = {
setMap: (map: AMapMap | null) => void;
setData: (data: AMapMassPoint[]) => void;
@@ -107,6 +124,8 @@ export type AMapLike = {
Map: new (container: HTMLDivElement, options: Record<string, unknown>) => AMapMap;
Marker: new (options: Record<string, unknown>) => AMapOverlay;
Polyline: new (options: Record<string, unknown>) => AMapOverlay;
Circle?: new (options: Record<string, unknown>) => AMapCircleOverlay;
MouseTool?: new (map: AMapMap) => AMapMouseTool;
Scale: new () => unknown;
ToolBar?: new (options?: Record<string, unknown>) => unknown;
Size: new (width: number, height: number) => unknown;