aviation-chart 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -8
- package/dist/MapSDK.d.ts +0 -128
- package/dist/apis/index.d.ts +0 -60
- package/dist/constants/aviation-sources.d.ts +0 -28
- package/dist/constants/builtin-layers.d.ts +0 -3
- package/dist/index.d.ts +0 -21
- package/dist/layericons/Airport-Civil-Selected.png +0 -0
- package/dist/layericons/Airport-Joint-Selected.png +0 -0
- package/dist/layericons/Airport-Military-Selected.png +0 -0
- package/dist/layericons/NDB-Mandatory-Selected.png +0 -0
- package/dist/layericons/NDB-Optional-Selected.png +0 -0
- package/dist/layericons/VOR-Mandatory-S-Selected.png +0 -0
- package/dist/layericons/VOR-Optional-S-Selected.png +0 -0
- package/dist/layericons/Waypoint-Mandatory-Selected.png +0 -0
- package/dist/layericons/Waypoint-Optional-Selected.png +0 -0
- package/dist/layericons/adsb-airplane.png +0 -0
- package/dist/layericons/air-label-left1.png +0 -0
- package/dist/layericons/air-label-none1.png +0 -0
- package/dist/layericons/air-label-right1.png +0 -0
- package/dist/layericons/airport-civ.png +0 -0
- package/dist/layericons/airport-mil.png +0 -0
- package/dist/layericons/airport-milext.png +0 -0
- package/dist/layericons/airport-userfoc.png +0 -0
- package/dist/layericons/airspace-line.png +0 -0
- package/dist/layericons/border.png +0 -0
- package/dist/layericons/controlled copy.png +0 -0
- package/dist/layericons/controlled-line.png +0 -0
- package/dist/layericons/controlled.png +0 -0
- package/dist/layericons/designate_point_inway.png +0 -0
- package/dist/layericons/designate_point_notinway.png +0 -0
- package/dist/layericons/line-blue-pattenr.png +0 -0
- package/dist/layericons/line-blue-pattern.png +0 -0
- package/dist/layericons/ndb-inway.png +0 -0
- package/dist/layericons/ndb-notinway.png +0 -0
- package/dist/layericons/notam-fill.png +0 -0
- package/dist/layericons/place-label.png +0 -0
- package/dist/layericons/re-text-bg.png +0 -0
- package/dist/layericons/restricted-line.png +0 -0
- package/dist/layericons/restricted.png +0 -0
- package/dist/layericons/segment-both.png +0 -0
- package/dist/layericons/segment-left.png +0 -0
- package/dist/layericons/segment-right.png +0 -0
- package/dist/layericons/sprite.json +0 -352
- package/dist/layericons/sprite.png +0 -0
- package/dist/layericons/sprite@2x.json +0 -352
- package/dist/layericons/sprite@2x.png +0 -0
- package/dist/layericons/taix-text-bg.png +0 -0
- package/dist/layericons/text-bg-orange.png +0 -0
- package/dist/layericons/text-bg-t.png +0 -0
- package/dist/layericons/text-bg.png +0 -0
- package/dist/layericons/vor-inway.png +0 -0
- package/dist/layericons/vor-notinway.png +0 -0
- package/dist/managers/ADSBManager.d.ts +0 -39
- package/dist/managers/ClickManager.d.ts +0 -15
- package/dist/managers/ErrorManager.d.ts +0 -25
- package/dist/managers/GeoJSONManager.d.ts +0 -29
- package/dist/managers/GlobalConfigManager.d.ts +0 -48
- package/dist/managers/Graticule.d.ts +0 -41
- package/dist/managers/HoverManage.d.ts +0 -26
- package/dist/managers/LayerManager.d.ts +0 -33
- package/dist/managers/LineLabelOptimizer.d.ts +0 -38
- package/dist/managers/NotamManager.d.ts +0 -40
- package/dist/managers/PerformanceManager.d.ts +0 -40
- package/dist/managers/PluginManager.d.ts +0 -17
- package/dist/managers/PopupManager.d.ts +0 -2
- package/dist/managers/RasterManager.d.ts +0 -16
- package/dist/managers/SelectFeature.d.ts +0 -34
- package/dist/managers/ThemeManage.d.ts +0 -11
- package/dist/managers/WindManager.d.ts +0 -21
- package/dist/nav-sdk.cjs +0 -27061
- package/dist/nav-sdk.min.js +0 -1
- package/dist/nav-sdk.umd.js +0 -27067
- package/dist/nav-sdk@0.2.1.cjs +0 -27061
- package/dist/nav-sdk@0.2.1.d.ts +0 -3228
- package/dist/nav-sdk@0.2.1.esm.js +0 -27037
- package/dist/nav-sdk@0.2.1.min.js +0 -1
- package/dist/nav-sdk@0.2.1.umd.js +0 -27067
- package/dist/plugins/DrawPlugin.d.ts +0 -14
- package/dist/plugins/MeasurePlugin.d.ts +0 -26
- package/dist/style/amm-chart.d.ts +0 -439
- package/dist/style/aviation-chart.d.ts +0 -2354
- package/dist/types/index.d.ts +0 -212
package/dist/types/index.d.ts
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import type { StyleSpecification, GeoJSONSourceSpecification, LayerSpecification } from "maplibre-gl";
|
|
2
|
-
import type { GeoJSON } from "geojson";
|
|
3
|
-
import type { GraticuleConfig } from '../managers/Graticule';
|
|
4
|
-
export interface IMapSDK {
|
|
5
|
-
setCenter(center: [number, number]): void;
|
|
6
|
-
setZoom(zoom: number): void;
|
|
7
|
-
setPitch(pitch: number): void;
|
|
8
|
-
setBearing(bearing: number): void;
|
|
9
|
-
fitBounds(bounds: [[number, number], [number, number]], options?: any): void;
|
|
10
|
-
addBuiltInLayer(layerName: string, zindex?: string | undefined): Promise<void>;
|
|
11
|
-
removeBuiltInLayer(layerName: string): void;
|
|
12
|
-
toggleBuiltInLayer(layerName: string): void;
|
|
13
|
-
getBuiltInLayers(): Object;
|
|
14
|
-
updateLayerStyle(layerId: string, style: StyleConfig): void;
|
|
15
|
-
setMapStyle(style: string | StyleSpecification, options?: {
|
|
16
|
-
diff?: boolean;
|
|
17
|
-
}): Promise<void>;
|
|
18
|
-
setTheme(theme: "light" | "dark"): void;
|
|
19
|
-
addPoint(coordinates: [number, number], properties?: Record<string, any>, style?: StyleConfig): string;
|
|
20
|
-
addLine(coordinates: [number, number][], properties?: Record<string, any>, style?: StyleConfig): string;
|
|
21
|
-
addPolygon(coordinates: [number, number][][], properties?: Record<string, any>, style?: StyleConfig): string;
|
|
22
|
-
addGeoJSON(sourceId: string, geojson?: GeoJSON | string | null | undefined, props?: GeoJSONSourceSpecification | null | undefined): any;
|
|
23
|
-
showLayers(layerIds: string[]): void;
|
|
24
|
-
hideLayers(layerIds: string[]): void;
|
|
25
|
-
on(event: string, listener: Function): void;
|
|
26
|
-
off(event: string, listener: Function): void;
|
|
27
|
-
getCenter(): [number, number];
|
|
28
|
-
getZoom(): number;
|
|
29
|
-
getBounds(): [[number, number], [number, number]];
|
|
30
|
-
destroy(): void;
|
|
31
|
-
use(plugin: IPlugin): void;
|
|
32
|
-
getPlugin<T extends IPlugin>(name: string): T | undefined;
|
|
33
|
-
setPeriod(period: string): void;
|
|
34
|
-
getPeriod(): string | undefined;
|
|
35
|
-
generateCurrentPeriod(): Promise<string>;
|
|
36
|
-
showGraticule(): void;
|
|
37
|
-
hideGraticule(): void;
|
|
38
|
-
toggleGraticule(): void;
|
|
39
|
-
updateGraticuleConfig(config: Partial<GraticuleConfig>): void;
|
|
40
|
-
isGraticuleVisible(): boolean;
|
|
41
|
-
}
|
|
42
|
-
export interface ILayerManager {
|
|
43
|
-
addLayer(config: LayerConfig): string;
|
|
44
|
-
removeLayer(id: string): boolean;
|
|
45
|
-
updateLayer(id: string, updates: Partial<LayerConfig>): boolean;
|
|
46
|
-
showLayer(id: string): boolean;
|
|
47
|
-
hideLayer(id: string): boolean;
|
|
48
|
-
toggleLayer(id: string): boolean;
|
|
49
|
-
getLayer(id: string): LayerConfig | undefined;
|
|
50
|
-
getAllLayers(): LayerConfig[];
|
|
51
|
-
batchShowLayers(ids: string[]): void;
|
|
52
|
-
batchHideLayers(ids: string[]): void;
|
|
53
|
-
batchUpdateLayers(updates: Array<{
|
|
54
|
-
id: string;
|
|
55
|
-
updates: Partial<LayerConfig>;
|
|
56
|
-
}>): void;
|
|
57
|
-
addBuiltInLayer(name: string, zindex?: string | undefined): Promise<void>;
|
|
58
|
-
removeBuiltInLayer(name: string): boolean;
|
|
59
|
-
getBuiltInLayers(): Record<string, string[]>;
|
|
60
|
-
isBuiltInLayerVisible(id: string): boolean;
|
|
61
|
-
setLODEnabled(enabled: boolean): void;
|
|
62
|
-
setLayerLODConfig(layerId: string, config: LODConfig): void;
|
|
63
|
-
}
|
|
64
|
-
export interface IGeoJSONManager {
|
|
65
|
-
addPoint(coordinates: [number, number], properties?: Record<string, any>, style?: StyleConfig, id?: string): string;
|
|
66
|
-
addLine(coordinates: [number, number][], properties?: Record<string, any>, style?: StyleConfig, id?: string): string;
|
|
67
|
-
addPolygon(coordinates: [number, number][][], properties?: Record<string, any>, style?: StyleConfig, id?: string): string;
|
|
68
|
-
addGeoJSON(sourceId: string, geojson?: GeoJSON | string | null | undefined, props?: GeoJSONSourceSpecification | null | undefined): any;
|
|
69
|
-
removeFeature(id: string): boolean;
|
|
70
|
-
updateFeature(id: string, updates: Partial<GeoJSONFeature>): boolean;
|
|
71
|
-
clearAllFeatures(): void;
|
|
72
|
-
getFeature(id: string): GeoJSONFeature | undefined;
|
|
73
|
-
getAllFeatures(): GeoJSONFeature[];
|
|
74
|
-
setClusteringEnabled(enabled: boolean): void;
|
|
75
|
-
setClusteringConfig(layerId: string, config: ClusteringConfig): void;
|
|
76
|
-
}
|
|
77
|
-
export interface IPlugin {
|
|
78
|
-
name: string;
|
|
79
|
-
version: string;
|
|
80
|
-
install(sdk: IMapSDK): void;
|
|
81
|
-
uninstall?(sdk: IMapSDK): void;
|
|
82
|
-
}
|
|
83
|
-
export interface SDKError extends Error {
|
|
84
|
-
code: string;
|
|
85
|
-
details?: any;
|
|
86
|
-
recoverable: boolean;
|
|
87
|
-
}
|
|
88
|
-
export type ErrorHandler = (error: SDKError) => void | Promise<void>;
|
|
89
|
-
export interface LODConfig {
|
|
90
|
-
minZoom: number;
|
|
91
|
-
maxZoom: number;
|
|
92
|
-
minPixelSize: number;
|
|
93
|
-
maxPixelSize: number;
|
|
94
|
-
cullingEnabled: boolean;
|
|
95
|
-
}
|
|
96
|
-
export interface ClusteringConfig {
|
|
97
|
-
enabled: boolean;
|
|
98
|
-
radius: number;
|
|
99
|
-
maxZoom: number;
|
|
100
|
-
minPoints: number;
|
|
101
|
-
}
|
|
102
|
-
export interface MapSDKOptions {
|
|
103
|
-
container: string | HTMLElement;
|
|
104
|
-
style?: string | object;
|
|
105
|
-
center?: [number, number];
|
|
106
|
-
zoom?: number;
|
|
107
|
-
minZoom?: number;
|
|
108
|
-
maxZoom?: number;
|
|
109
|
-
pitch?: number;
|
|
110
|
-
bearing?: number;
|
|
111
|
-
interactive?: boolean;
|
|
112
|
-
preserveDrawingBuffer?: boolean;
|
|
113
|
-
errorHandler?: ErrorHandler;
|
|
114
|
-
performance?: {
|
|
115
|
-
lodEnabled?: boolean;
|
|
116
|
-
clusteringEnabled?: boolean;
|
|
117
|
-
lazyLoadingEnabled?: boolean;
|
|
118
|
-
};
|
|
119
|
-
plugins?: IPlugin[];
|
|
120
|
-
apiKey?: string;
|
|
121
|
-
period?: string;
|
|
122
|
-
version?: string;
|
|
123
|
-
baseUrl?: string;
|
|
124
|
-
staticUrl?: string;
|
|
125
|
-
apiUrl?: string;
|
|
126
|
-
spriteUrl?: string;
|
|
127
|
-
terrainUrl?: string;
|
|
128
|
-
layers?: Record<string, boolean>;
|
|
129
|
-
enableAIP?: boolean;
|
|
130
|
-
enableNOTAM?: boolean;
|
|
131
|
-
enableADSB?: boolean;
|
|
132
|
-
theme?: 'light' | 'dark';
|
|
133
|
-
language?: 'zh-CN' | 'en-US';
|
|
134
|
-
switchDay?: number;
|
|
135
|
-
graticule?: {
|
|
136
|
-
enabled?: boolean;
|
|
137
|
-
interval?: number;
|
|
138
|
-
lineColor?: string;
|
|
139
|
-
lineWidth?: number;
|
|
140
|
-
lineOpacity?: number;
|
|
141
|
-
lineDasharray?: number[];
|
|
142
|
-
labelColor?: string;
|
|
143
|
-
labelSize?: number;
|
|
144
|
-
labelOffset?: [number, number];
|
|
145
|
-
showLabels?: boolean;
|
|
146
|
-
labelFormat?: 'decimal' | 'dms';
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
export interface LayerConfig {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string;
|
|
152
|
-
description?: string;
|
|
153
|
-
category: "base" | "overlay" | "label" | "custom";
|
|
154
|
-
type: "background" | "fill" | "line" | "symbol" | "raster" | "hillshade" | "circle" | "custom";
|
|
155
|
-
source: string;
|
|
156
|
-
sourceLayer?: string;
|
|
157
|
-
defaultVisible: boolean;
|
|
158
|
-
paint?: any;
|
|
159
|
-
layout?: any;
|
|
160
|
-
filter?: any[];
|
|
161
|
-
lod?: LODConfig;
|
|
162
|
-
lazyLoad?: boolean;
|
|
163
|
-
maxzoom?: number;
|
|
164
|
-
minzoom?: number;
|
|
165
|
-
"source-layer"?: string;
|
|
166
|
-
}
|
|
167
|
-
export interface BuiltInLayer extends LayerConfig {
|
|
168
|
-
builtin: true;
|
|
169
|
-
}
|
|
170
|
-
export interface GeoJSONFeature {
|
|
171
|
-
id: string;
|
|
172
|
-
type: "Feature";
|
|
173
|
-
geometry: {
|
|
174
|
-
type: "Point" | "LineString" | "Polygon" | "MultiPoint" | "MultiLineString" | "MultiPolygon";
|
|
175
|
-
coordinates: any;
|
|
176
|
-
};
|
|
177
|
-
properties: Record<string, any>;
|
|
178
|
-
style?: StyleConfig;
|
|
179
|
-
}
|
|
180
|
-
export interface GeoJSONCollection {
|
|
181
|
-
type: "FeatureCollection";
|
|
182
|
-
features: GeoJSONFeature[];
|
|
183
|
-
}
|
|
184
|
-
export interface StyleConfig {
|
|
185
|
-
paint?: any;
|
|
186
|
-
layout?: any;
|
|
187
|
-
filter?: any[];
|
|
188
|
-
}
|
|
189
|
-
export interface MapEvent {
|
|
190
|
-
type: string;
|
|
191
|
-
target: any;
|
|
192
|
-
[key: string]: any;
|
|
193
|
-
}
|
|
194
|
-
export type EventListener = (event: MapEvent) => void;
|
|
195
|
-
export interface HookContext {
|
|
196
|
-
sdk: IMapSDK;
|
|
197
|
-
[key: string]: any;
|
|
198
|
-
}
|
|
199
|
-
export type HookCallback = (context: HookContext) => void | Promise<void>;
|
|
200
|
-
export interface HookRegistry {
|
|
201
|
-
[hookName: string]: HookCallback[];
|
|
202
|
-
}
|
|
203
|
-
export type StyleImageMetadata = {
|
|
204
|
-
pixelRatio: number;
|
|
205
|
-
sdf: boolean;
|
|
206
|
-
usvg: boolean;
|
|
207
|
-
stretchX?: Array<[number, number]>;
|
|
208
|
-
stretchY?: Array<[number, number]>;
|
|
209
|
-
content?: [number, number, number, number];
|
|
210
|
-
};
|
|
211
|
-
export type LayerRef = string | Array<string> | RegExp | ((arg0: LayerSpecification) => boolean);
|
|
212
|
-
export type HtmlFunction = (feature: any, popup: any) => string | Promise<string>;
|