@teeechina/teee-map 0.0.37 → 0.1.0
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/README.md +0 -3
- package/dist/index.cjs +34 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1388 -0
- package/dist/index.d.ts +1388 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/package.json +80 -33
- package/dist/.vite/license.md +0 -406
- package/dist/teee-map.css +0 -2
- package/dist/teee-map.mjs +0 -53084
- package/dist/teee-map.umd.js +0 -1284
- package/index.d.ts +0 -525
package/index.d.ts
DELETED
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
import type { Map as MaplibreMap, LngLat, GeoJSONFeature } from 'maplibre-gl';
|
|
2
|
-
import type { LayerSpecification, SourceSpecification } from 'maplibre-gl';
|
|
3
|
-
import type { FeatureCollection } from 'geojson';
|
|
4
|
-
|
|
5
|
-
// ─────────────────────────────────────────────
|
|
6
|
-
// 基础枚举 & 联合类型
|
|
7
|
-
// ─────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
export type MapType = 'graph' | 'geom' | 'ctc' | 'raster';
|
|
10
|
-
|
|
11
|
-
export type LayerType = 'background' | 'signal' | 'track' | 'track_circuit' | 'bumper' | 'switch' | 'switch_loc' | 'insulation' | 'label' | 'prevention' | 'sgfhqy' | 'region';
|
|
12
|
-
|
|
13
|
-
// 股道 | 桥梁 | 隧道 | 信号机 | 曲线 | 防洪 | 坡道 | 接触网分相 | 通话柱
|
|
14
|
-
export type RegionLayerType = 'background' | 'track' | 'bridge' | 'tunnel' | 'region_signal' | 'curve' | 'floodcontrol' | 'ramp' | 'contactseparation' | 'callpost';
|
|
15
|
-
|
|
16
|
-
// ─────────────────────────────────────────────
|
|
17
|
-
// 联锁枚举
|
|
18
|
-
// ─────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
/** 联锁信号机状态 */
|
|
21
|
-
export enum InterLockSignal {
|
|
22
|
-
RedLight = 1,
|
|
23
|
-
GreenLight = 2,
|
|
24
|
-
WhiteLight = 3,
|
|
25
|
-
BlueLight = 4,
|
|
26
|
-
Unknown = 5,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/** 联锁电路区段状态 */
|
|
30
|
-
export enum InterLockCircuit {
|
|
31
|
-
RedCircuit = 1,
|
|
32
|
-
WhiteCircuit = 2,
|
|
33
|
-
EqualRedCircuit = 3,
|
|
34
|
-
GreyCircuit = 4,
|
|
35
|
-
GreenCircuit = 5,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** 联锁道岔状态 */
|
|
39
|
-
export enum InterLockSwitchloc {
|
|
40
|
-
NormalPosition = 2,
|
|
41
|
-
ReversePosition = 3,
|
|
42
|
-
NeutralPosition = 4,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** 闭塞信号 */
|
|
46
|
-
export enum BsSignal {
|
|
47
|
-
COME_GREEN = 0,
|
|
48
|
-
COME_YELLOW = 1,
|
|
49
|
-
COME_RED = 2,
|
|
50
|
-
GO_GREEN = 3,
|
|
51
|
-
GO_YELLOW = 4,
|
|
52
|
-
GO_RED = 5,
|
|
53
|
-
LOCK = 6,
|
|
54
|
-
EMERGENCY = 7,
|
|
55
|
-
RESET = 8,
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/** 防控点类型枚举 */
|
|
59
|
-
export enum PreventionTypes {
|
|
60
|
-
NULL = 0,
|
|
61
|
-
BUMPER = 1,
|
|
62
|
-
CONTACTLINEEND = 2,
|
|
63
|
-
FIXEDDERAILER = 3,
|
|
64
|
-
CONTACTLINENOSTOP = 4,
|
|
65
|
-
CONTACTLINENOSTOPIN = 5,
|
|
66
|
-
OTHERPROMPT = 6,
|
|
67
|
-
OTHERBRAKE = 7,
|
|
68
|
-
ONESTOP = 8,
|
|
69
|
-
SPEEDLIMITED = 9,
|
|
70
|
-
SPEEDNOTICE = 10,
|
|
71
|
-
CROSSSPEEDLIMITED = 11,
|
|
72
|
-
CONTACTLINEPSS = 12,
|
|
73
|
-
SSG = 13,
|
|
74
|
-
CONTACTLINEPSSIN = 14,
|
|
75
|
-
CONTACTLINENOAREA = 15,
|
|
76
|
-
HIGHPOSTSIGNAL = 16,
|
|
77
|
-
RESCUEVEHICLE = 17,
|
|
78
|
-
RAILWAYCROSS = 18,
|
|
79
|
-
TRAIN = 19,
|
|
80
|
-
STATIONBOUND = 20,
|
|
81
|
-
SHORTPOSTSIGNAL = 21,
|
|
82
|
-
BRIDGE = 22,
|
|
83
|
-
WHITE = 23,
|
|
84
|
-
WHITEBLUE = 24,
|
|
85
|
-
BLUE = 25,
|
|
86
|
-
BLUEWHITE = 26,
|
|
87
|
-
SLOPE = 27,
|
|
88
|
-
PEOPLE = 28,
|
|
89
|
-
TUNNEL = 29,
|
|
90
|
-
DANGER = 30,
|
|
91
|
-
SIGNAL = 31,
|
|
92
|
-
SWERVE = 32,
|
|
93
|
-
SWITCH = 33,
|
|
94
|
-
ISOLATE = 35,
|
|
95
|
-
TGQ = 47,
|
|
96
|
-
BLOCKLINE = 50,
|
|
97
|
-
WORKAREA = 51,
|
|
98
|
-
ROUTELINE = 52,
|
|
99
|
-
PARK = 53,
|
|
100
|
-
WORKBUOND = 54,
|
|
101
|
-
WORKBUONDCROSS = 55,
|
|
102
|
-
LEFTHIGHPLATFORM = 61,
|
|
103
|
-
RIGHTHIGHPLATFORM = 62,
|
|
104
|
-
BOTHSIDEHIGHPLATFORM = 63,
|
|
105
|
-
DOOR = 87,
|
|
106
|
-
ISOLATESWITCH = 100,
|
|
107
|
-
OTHER = 95,
|
|
108
|
-
SIDE = 253,
|
|
109
|
-
NONE = 254,
|
|
110
|
-
MAX = 255,
|
|
111
|
-
FOULINGPOST = 38,
|
|
112
|
-
CUNCHE = 39,
|
|
113
|
-
STATIONBOUNDEXTEND = 40,
|
|
114
|
-
RED = 41,
|
|
115
|
-
GREEN = 42,
|
|
116
|
-
YELLOW = 43,
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// ─────────────────────────────────────────────
|
|
120
|
-
// 地图配置接口
|
|
121
|
-
// ─────────────────────────────────────────────
|
|
122
|
-
|
|
123
|
-
/** MapForge 生成的地图初始化配置 */
|
|
124
|
-
export interface MapForgeConfig {
|
|
125
|
-
id: string; // 地图主源名
|
|
126
|
-
sourceUrl?: string; // 用于 Vector/Raster 的 URL
|
|
127
|
-
|
|
128
|
-
subSourceId?: string;
|
|
129
|
-
subSourceUrl?: string;
|
|
130
|
-
|
|
131
|
-
layers?: (LayerType | RegionLayerType)[]; // 加载的图层类型
|
|
132
|
-
sourceLayers?: string[]; // 矢量瓦片内部的图层名
|
|
133
|
-
type?: 'region' | 'station';
|
|
134
|
-
|
|
135
|
-
zoom?: number; // 初始缩放级别
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/** 传递给 initMap 的参数结构 */
|
|
139
|
-
export interface MapParams {
|
|
140
|
-
id: string;
|
|
141
|
-
source: SourceSpecification;
|
|
142
|
-
subSourceId?: string;
|
|
143
|
-
subSource?: SourceSpecification;
|
|
144
|
-
layers?: LayerSpecification[];
|
|
145
|
-
subLayers?: LayerSpecification[];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/** 图标配置 */
|
|
149
|
-
export interface IconType {
|
|
150
|
-
id: string;
|
|
151
|
-
image: HTMLImageElement;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/** 要素状态配置 */
|
|
155
|
-
export interface stateType {
|
|
156
|
-
/** 股道:封锁(1) / 停电(2) / 无接触网(3) */
|
|
157
|
-
state?: string;
|
|
158
|
-
/** 选中状态 */
|
|
159
|
-
select?: boolean;
|
|
160
|
-
/** 是否可见 */
|
|
161
|
-
visiable?: boolean;
|
|
162
|
-
/** 信号机(钮封) / 道岔:占用(3) / 锁闭(2) */
|
|
163
|
-
subState1?: any;
|
|
164
|
-
/** 信号机(灭灯) / 道岔:单锁(1) / 解锁 */
|
|
165
|
-
subState2?: any;
|
|
166
|
-
/** 信号机(暂无) / 道岔:单封(1) / 解封 */
|
|
167
|
-
subState3?: any;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface layerSettingItem {
|
|
171
|
-
key: string;
|
|
172
|
-
label: string;
|
|
173
|
-
checked: boolean;
|
|
174
|
-
disabled: boolean;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface FeatureInteractionPayload {
|
|
178
|
-
type: LayerType;
|
|
179
|
-
code: string;
|
|
180
|
-
state: stateType;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export interface AppEvents {
|
|
184
|
-
'map:inited': any;
|
|
185
|
-
'map:feature-click': FeatureInteractionPayload;
|
|
186
|
-
'map:path-selected': any;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// ─────────────────────────────────────────────
|
|
190
|
-
// 绘图工具
|
|
191
|
-
// ─────────────────────────────────────────────
|
|
192
|
-
|
|
193
|
-
export type DrawMode =
|
|
194
|
-
| 'point'
|
|
195
|
-
| 'linestring'
|
|
196
|
-
| 'polygon'
|
|
197
|
-
| 'rectangle'
|
|
198
|
-
| 'angled-rectangle'
|
|
199
|
-
| 'sensor'
|
|
200
|
-
| 'sector'
|
|
201
|
-
| 'circle'
|
|
202
|
-
| 'freehand'
|
|
203
|
-
| 'freehand-linestring'
|
|
204
|
-
| 'select'
|
|
205
|
-
| 'render';
|
|
206
|
-
|
|
207
|
-
export interface ModeStyles {
|
|
208
|
-
filledColor?: string;
|
|
209
|
-
outlineColor?: string;
|
|
210
|
-
outlineWidth?: number;
|
|
211
|
-
markerColor?: string;
|
|
212
|
-
markerWidth?: number;
|
|
213
|
-
markerOutlineColor?: string;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export type DrawEventCallback = (features: GeoJSON.FeatureCollection) => void;
|
|
217
|
-
export type SelectEventCallback = (id: string | null) => void;
|
|
218
|
-
|
|
219
|
-
export declare class DrawTool {
|
|
220
|
-
constructor(mapSdk: TeeeMap);
|
|
221
|
-
|
|
222
|
-
addToMap(isOpen?: boolean): Promise<void>;
|
|
223
|
-
removeFromMap(): void;
|
|
224
|
-
changeMode(mode: DrawMode | 'undo' | 'redo' | 'download', styles?: ModeStyles): void;
|
|
225
|
-
setForcedCoordinate(coord: [number, number] | null): void;
|
|
226
|
-
setOnFinish(cb: DrawEventCallback): void;
|
|
227
|
-
setOnChange(cb: DrawEventCallback): void;
|
|
228
|
-
setOnDelete(cb: DrawEventCallback): void;
|
|
229
|
-
setOnSelect(cb: SelectEventCallback): void;
|
|
230
|
-
getFeatures(): GeoJSON.FeatureCollection;
|
|
231
|
-
addFeatures(features: GeoJSON.FeatureCollection): void;
|
|
232
|
-
clearFeatures(): void;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// ─────────────────────────────────────────────
|
|
236
|
-
// 测量工具
|
|
237
|
-
// ─────────────────────────────────────────────
|
|
238
|
-
|
|
239
|
-
export declare class MeasureTool {
|
|
240
|
-
constructor(map: MaplibreMap);
|
|
241
|
-
|
|
242
|
-
/** 开始距离测量模式 */
|
|
243
|
-
startDistance(): void;
|
|
244
|
-
/** 开始面积测量模式 */
|
|
245
|
-
startArea(): void;
|
|
246
|
-
/** 清除所有测量图层、数据源和 DOM 元素 */
|
|
247
|
-
clear(): void;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// ─────────────────────────────────────────────
|
|
251
|
-
// 联锁协议 & 可视化
|
|
252
|
-
// ─────────────────────────────────────────────
|
|
253
|
-
|
|
254
|
-
export interface InterlockItem {
|
|
255
|
-
name: string;
|
|
256
|
-
state: string;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
export interface InterlockData {
|
|
260
|
-
signalInterlock: InterlockItem[];
|
|
261
|
-
switchInterlock: InterlockItem[];
|
|
262
|
-
circuitInterlock: InterlockItem[];
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export declare class InterlockProtocol {
|
|
266
|
-
signalExist: boolean;
|
|
267
|
-
productInfo?: string;
|
|
268
|
-
stationCode?: string;
|
|
269
|
-
time?: string;
|
|
270
|
-
|
|
271
|
-
getProductInfo(): string | undefined;
|
|
272
|
-
getStCode(): string | undefined;
|
|
273
|
-
getInterlockInfo(): Map<string, InterlockData>;
|
|
274
|
-
isSignalExist(): boolean;
|
|
275
|
-
setYardSignal(signal: string): void;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export interface InsulationSignals {
|
|
279
|
-
upsignal: string | null;
|
|
280
|
-
downsignal: string | null;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export declare class InterLockInsulation {
|
|
284
|
-
setInsulation(features: GeoJSONFeature[]): void;
|
|
285
|
-
getSignalsByInsulation(id: string): InsulationSignals | undefined;
|
|
286
|
-
getInsulationBySignal(signalId: string): string | undefined;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export interface InterlockVisualizationGraphOptions {
|
|
290
|
-
mode: 'graph';
|
|
291
|
-
map: MaplibreMap;
|
|
292
|
-
sourceId: string;
|
|
293
|
-
sourceLayers: {
|
|
294
|
-
signal: string;
|
|
295
|
-
switch: string;
|
|
296
|
-
switch_loc: string;
|
|
297
|
-
track_circuit: string;
|
|
298
|
-
track: string;
|
|
299
|
-
insulation: string;
|
|
300
|
-
};
|
|
301
|
-
firstSwitches?: string[];
|
|
302
|
-
updateFeatureState?: (code: string | number, state: any) => void;
|
|
303
|
-
queryGeojsonFeatures?: (key: string) => GeoJSONFeature[];
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export interface InterlockVisualizationGeoJsonOptions {
|
|
307
|
-
mode: 'geojson';
|
|
308
|
-
map: MaplibreMap;
|
|
309
|
-
sourceIds: {
|
|
310
|
-
signal: string;
|
|
311
|
-
switch: string;
|
|
312
|
-
switch_loc: string;
|
|
313
|
-
track_circuit: string;
|
|
314
|
-
track: string;
|
|
315
|
-
insulation: string;
|
|
316
|
-
};
|
|
317
|
-
firstSwitches?: string[];
|
|
318
|
-
updateFeatureState?: (code: string | number, state: any) => void;
|
|
319
|
-
queryGeojsonFeatures?: (key: string) => GeoJSONFeature[];
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export interface InterlockVisualizationLegacyOptions {
|
|
323
|
-
map: MaplibreMap;
|
|
324
|
-
sourceId: string;
|
|
325
|
-
sourceLayers: {
|
|
326
|
-
signal: string;
|
|
327
|
-
switch: string;
|
|
328
|
-
switch_loc: string;
|
|
329
|
-
track_circuit: string;
|
|
330
|
-
track: string;
|
|
331
|
-
insulation: string;
|
|
332
|
-
};
|
|
333
|
-
firstSwitches?: string[];
|
|
334
|
-
updateFeatureState?: (code: string | number, state: any) => void;
|
|
335
|
-
queryGeojsonFeatures?: (key: string) => GeoJSONFeature[];
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
export type InterlockVisualizationOptions = InterlockVisualizationGraphOptions | InterlockVisualizationGeoJsonOptions | InterlockVisualizationLegacyOptions;
|
|
339
|
-
|
|
340
|
-
export declare class InterLockVisualization {
|
|
341
|
-
constructor(options: InterlockVisualizationOptions);
|
|
342
|
-
|
|
343
|
-
/** 初始化绝缘节与信号机的映射关系,构造后需调用一次 */
|
|
344
|
-
initInsulation(): void;
|
|
345
|
-
|
|
346
|
-
/** 处理一帧联锁信号数据字符串,自动识别 ZK01 / YD 协议并刷新要素状态 */
|
|
347
|
-
handleSignalData(res: string): void;
|
|
348
|
-
|
|
349
|
-
/** 清空所有联锁状态缓存,将所有要素状态还原为初始值 */
|
|
350
|
-
turnOffSignals(): void;
|
|
351
|
-
|
|
352
|
-
/** 启用信号发送模式 */
|
|
353
|
-
startRunning(): void;
|
|
354
|
-
|
|
355
|
-
/** 禁用信号发送模式 */
|
|
356
|
-
stopRunning(): void;
|
|
357
|
-
|
|
358
|
-
/** 设置信号发送回调,回调参数为按协议格式组装的字符串数组 */
|
|
359
|
-
setSendSignalCallback(callback: (dataList: string[]) => void): void;
|
|
360
|
-
|
|
361
|
-
/** 设置站场信号状态列表 */
|
|
362
|
-
setStationSignalState(stationSignalState: string[], filterCodes?: string[]): void;
|
|
363
|
-
|
|
364
|
-
/** 将 interLockState 缓存中的状态按协议格式组装后触发回调 */
|
|
365
|
-
sendSignal(): void;
|
|
366
|
-
|
|
367
|
-
/** 将所有状态置零后发送一次清空帧,用于暂停场景 */
|
|
368
|
-
pauseSignal(): void;
|
|
369
|
-
|
|
370
|
-
/** 直接读取 MapLibre 图层 feature state 生成信号字符串并发送,不依赖缓存 */
|
|
371
|
-
collectStateAndSend(): void;
|
|
372
|
-
|
|
373
|
-
collectState(): string[];
|
|
374
|
-
|
|
375
|
-
/** @deprecated 请改用 handleSignalData */
|
|
376
|
-
setInterlockData(protocol: InterlockProtocol): void;
|
|
377
|
-
|
|
378
|
-
/** @deprecated 请改用 turnOffSignals */
|
|
379
|
-
clear(): void;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// ─────────────────────────────────────────────
|
|
383
|
-
// TeeeMap 主类
|
|
384
|
-
// ─────────────────────────────────────────────
|
|
385
|
-
|
|
386
|
-
export declare class TeeeMap {
|
|
387
|
-
public map: MaplibreMap;
|
|
388
|
-
public mapConfigs: MapForgeConfig;
|
|
389
|
-
public stashFeatures: Map<any, any>;
|
|
390
|
-
/** 地图方向 */
|
|
391
|
-
public mapDir: 'left' | 'right';
|
|
392
|
-
/** GeoJSON 图层要素缓存:key 为图层名,value 为该图层所有要素 */
|
|
393
|
-
public layerFeaturesCache: Map<string, GeoJSONFeature[]>;
|
|
394
|
-
/** 绘图工具(地图 load 事件后可用) */
|
|
395
|
-
public drawTool: DrawTool;
|
|
396
|
-
/** 测量工具(地图 load 事件后可用) */
|
|
397
|
-
public measureTool?: MeasureTool;
|
|
398
|
-
|
|
399
|
-
constructor(container: string | HTMLElement, mbtileDBClient?: any);
|
|
400
|
-
|
|
401
|
-
// ── 数据源管理 ──
|
|
402
|
-
addGeoJsonSource(id: string, data?: any): void;
|
|
403
|
-
removeSource(id: string): void;
|
|
404
|
-
updateGeoJsonSource(id: string, data: any): void;
|
|
405
|
-
addVectorTileSource(id: string, url: string): void;
|
|
406
|
-
addRasterTileSource(id: string, url: string): void;
|
|
407
|
-
|
|
408
|
-
// ── 图层管理 ──
|
|
409
|
-
addGeoJsonLayer(layerId: string, sourceId: string, type?: 'fill' | 'line' | 'circle' | 'symbol', paint?: any, layout?: any): void;
|
|
410
|
-
updateLayerStyle(id: string, paint: any): void;
|
|
411
|
-
removeLayer(id: string): void;
|
|
412
|
-
|
|
413
|
-
// ── 交互事件 ──
|
|
414
|
-
onFeatureClick(layerIds: string | string[], callback: (feature: GeoJSONFeature, lngLat: LngLat) => void): void;
|
|
415
|
-
|
|
416
|
-
// ── 生命周期 ──
|
|
417
|
-
destroy(): void;
|
|
418
|
-
initState(): void;
|
|
419
|
-
initMap(mapParams: MapParams): void;
|
|
420
|
-
|
|
421
|
-
// ── 要素状态 ──
|
|
422
|
-
initCTCFeatureState(f: GeoJSONFeature): void;
|
|
423
|
-
initGraphFeatureState(f: GeoJSONFeature): void;
|
|
424
|
-
initGeoJsonFeatureState(f: GeoJSONFeature, layerType: string): void;
|
|
425
|
-
initGeoJsonState(): void;
|
|
426
|
-
initMixGeoJsonMapState(): void;
|
|
427
|
-
stashAllFeature(): void;
|
|
428
|
-
setSscsPointState(code: string | number, state: string): void;
|
|
429
|
-
|
|
430
|
-
// ── 要素缓存就绪信号 ──
|
|
431
|
-
/** 使当前要素缓存就绪信号失败并唤醒所有等待方(destroy 时内部调用) */
|
|
432
|
-
invalidateStashReady(reason?: string): void;
|
|
433
|
-
/** 等待要素缓存(stashFeatures)就绪,超时或地图销毁时 reject */
|
|
434
|
-
whenStashed(timeout?: number): Promise<void>;
|
|
435
|
-
/** 注册要素缓存就绪回调(事件风格 API,内部等价于 whenStashed().then(cb)) */
|
|
436
|
-
onStashReady(cb: () => void, onError?: (err: unknown) => void): void;
|
|
437
|
-
updateFeatureState(code: string | number, state: any): void;
|
|
438
|
-
|
|
439
|
-
// ── 地图创建方法 ──
|
|
440
|
-
createCTCMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
441
|
-
createRSWPMap(url: string): void;
|
|
442
|
-
createGraphMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
443
|
-
createGeomMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
444
|
-
createMbtilesMap(mbtileDBClient: any, url: string, layers: LayerType[]): void;
|
|
445
|
-
createRasterMap(url: string): void;
|
|
446
|
-
createGraphEncryptedMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
447
|
-
createGeomEncryptedMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
448
|
-
createCTCEncryptedMap(stcode: string, url: string, layers: LayerType[]): void;
|
|
449
|
-
createGeoJsonStationMap(stationDatas: GeojsonStationDatas[]): Promise<void>;
|
|
450
|
-
createSscsGraphMap(url: string): void;
|
|
451
|
-
createMixGeoJsonMap(
|
|
452
|
-
stationDatas: {
|
|
453
|
-
code: string;
|
|
454
|
-
type: 'region' | 'station';
|
|
455
|
-
geojsonData: {
|
|
456
|
-
name: string;
|
|
457
|
-
data: GeoJSON.FeatureCollection | string;
|
|
458
|
-
}[];
|
|
459
|
-
deltaInfo?: {
|
|
460
|
-
deltax: number;
|
|
461
|
-
deltay: number;
|
|
462
|
-
};
|
|
463
|
-
}[],
|
|
464
|
-
): Promise<void>;
|
|
465
|
-
/** 创建 GeoJSON 站场地理图(加载高德影像底图 + 不转换3857坐标系) */
|
|
466
|
-
createGeoJsonGeomStationMap(stationDatas: GeojsonStationDatas[], showImage?: boolean): Promise<void>;
|
|
467
|
-
/** 创建geojson数据来源的站场区间平面地理图(加载高德影像底图 + 不转换3857坐标系) */
|
|
468
|
-
createMixGeoJsonGeomMap(
|
|
469
|
-
mapDatas: {
|
|
470
|
-
code: string;
|
|
471
|
-
type: 'region' | 'station';
|
|
472
|
-
geojsonData: {
|
|
473
|
-
name: string;
|
|
474
|
-
data: GeoJSON.FeatureCollection | string;
|
|
475
|
-
}[];
|
|
476
|
-
}[],
|
|
477
|
-
showImage?: boolean,
|
|
478
|
-
): Promise<void>;
|
|
479
|
-
createGeoJsonRegionMap(
|
|
480
|
-
regionCode: string,
|
|
481
|
-
regionDatas: {
|
|
482
|
-
name: string;
|
|
483
|
-
data: GeoJSON.FeatureCollection | string;
|
|
484
|
-
}[],
|
|
485
|
-
): Promise<void>;
|
|
486
|
-
|
|
487
|
-
// ── 其他工具方法 ──
|
|
488
|
-
getMap(): MaplibreMap;
|
|
489
|
-
getMapConfigs(): MapForgeConfig;
|
|
490
|
-
getFeatureState(code: string | number): Record<string, unknown> | undefined;
|
|
491
|
-
locateGeojsonFeature(data: GeoJSON.FeatureCollection, transform?: boolean): void;
|
|
492
|
-
/** 根据要素编码与图层类型将地图缩放至该要素位置 */
|
|
493
|
-
locateFeatureByCode(code: string, layerType: LayerType): void;
|
|
494
|
-
/** 平滑闪烁高亮指定要素,返回清理函数用于提前终止动画 */
|
|
495
|
-
smoothBlinkFeature(
|
|
496
|
-
code: string,
|
|
497
|
-
layerType: LayerType,
|
|
498
|
-
options?: {
|
|
499
|
-
duration?: number;
|
|
500
|
-
blinkSpeed?: number;
|
|
501
|
-
baseColor?: [number, number, number];
|
|
502
|
-
minAlpha?: number;
|
|
503
|
-
maxAlpha?: number;
|
|
504
|
-
strokeWidthBase?: number;
|
|
505
|
-
strokeWidthRange?: number;
|
|
506
|
-
},
|
|
507
|
-
): () => void;
|
|
508
|
-
getTrackCircuitFeaturesByCodes(circuitCodes: string[]): GeoJSONFeature[];
|
|
509
|
-
/** 查询指定 GeoJSON 图层的所有要素 */
|
|
510
|
-
queryGeojsonFeatures(key: string): GeoJSONFeature[];
|
|
511
|
-
/** 根据要素编码与图层类型获取单个 GeoJSON 要素 */
|
|
512
|
-
getGeojsonLayerFeaturesByCode(code: string, layerType: LayerType): GeoJSONFeature | undefined;
|
|
513
|
-
|
|
514
|
-
// 信号解析与模拟
|
|
515
|
-
interLockVisualization?: InterLockVisualization;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
export default TeeeMap;
|
|
519
|
-
|
|
520
|
-
export interface GeojsonStationDatas {
|
|
521
|
-
name: string;
|
|
522
|
-
data: GeoJSON.FeatureCollection | string;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
export declare function transformGeoJsonFrom3857(geojson: FeatureCollection): FeatureCollection;
|