@bitalltech-maplibre/core 1.0.2 → 1.0.3
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 +102 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1566 -107
- package/dist/index.umd.js +1 -1
- package/dist/types/effects/electronic-fence-common.d.ts +76 -0
- package/dist/types/effects/electronic-fence-types.d.ts +131 -0
- package/dist/types/effects/index.d.ts +3 -0
- package/dist/types/effects/low-altitude/breach-alert.d.ts +61 -0
- package/dist/types/effects/low-altitude/breathing-circle.d.ts +5 -0
- package/dist/types/effects/low-altitude/coordinated-countermeasure.d.ts +5 -0
- package/dist/types/effects/low-altitude/countermeasure-beam.d.ts +5 -0
- package/dist/types/effects/low-altitude/defence-circle.d.ts +5 -0
- package/dist/types/effects/low-altitude/directional-pulse.d.ts +6 -0
- package/dist/types/effects/low-altitude/navigation-spoofing.d.ts +6 -0
- package/dist/types/effects/low-altitude/pulse-marker.d.ts +5 -0
- package/dist/types/effects/low-altitude/radar-sweep.d.ts +5 -0
- package/dist/types/effects/low-altitude/ring-pulse-marker.d.ts +5 -0
- package/dist/types/effects/low-altitude/sector-scan.d.ts +5 -0
- package/dist/types/effects/low-altitude/shared.d.ts +67 -0
- package/dist/types/effects/low-altitude/target-lock.d.ts +4 -0
- package/dist/types/effects/low-altitude/types.d.ts +333 -0
- package/dist/types/effects/low-altitude/visual.d.ts +15 -0
- package/dist/types/effects/low-altitude.d.ts +15 -441
- package/dist/types/effects/standard-electronic-fence.d.ts +7 -0
- package/dist/types/effects/webgl-electronic-fence.d.ts +7 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/map/create-map.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,441 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
id: string;
|
|
17
|
-
/** 更新特效配置。内部会重建 source/layer 或刷新动画数据。 */
|
|
18
|
-
update: (options: Partial<Omit<Options, "id">>) => void;
|
|
19
|
-
/** 显示全部相关图层,不重新创建 source。 */
|
|
20
|
-
show: () => void;
|
|
21
|
-
/** 隐藏全部相关图层,source 数据仍保留。 */
|
|
22
|
-
hide: () => void;
|
|
23
|
-
/** 移除图层、source 和动画。调用后控制器不可再恢复。 */
|
|
24
|
-
remove: () => void;
|
|
25
|
-
}
|
|
26
|
-
/** 单点扩散脉冲:适合告警点、事件点、目标点高亮。 */
|
|
27
|
-
export interface PulseMarkerOptions extends BaseEffectOptions {
|
|
28
|
-
/** 中心实心区域半径,单位米。 */
|
|
29
|
-
radius?: number;
|
|
30
|
-
/** 脉冲最大扩散半径,单位米。 */
|
|
31
|
-
maxRadius?: number;
|
|
32
|
-
/** 主颜色。 */
|
|
33
|
-
color?: string;
|
|
34
|
-
/** 中心填充色,默认跟随 color。 */
|
|
35
|
-
fillColor?: string;
|
|
36
|
-
/** 中心填充透明度。 */
|
|
37
|
-
fillOpacity?: number;
|
|
38
|
-
/** 脉冲环透明度。 */
|
|
39
|
-
pulseOpacity?: number;
|
|
40
|
-
/** 脉冲环线宽。 */
|
|
41
|
-
lineWidth?: number;
|
|
42
|
-
/** 同时存在的脉冲环数量。 */
|
|
43
|
-
pulseCount?: number;
|
|
44
|
-
/** 一轮扩散动画时长,单位毫秒。 */
|
|
45
|
-
duration?: number;
|
|
46
|
-
}
|
|
47
|
-
/** 多环脉冲:比普通脉冲更强调中心和外扩环。 */
|
|
48
|
-
export interface RingPulseMarkerOptions extends BaseEffectOptions {
|
|
49
|
-
/** 核心半径,单位米。 */
|
|
50
|
-
radius?: number;
|
|
51
|
-
/** 外环最大半径,单位米。 */
|
|
52
|
-
maxRadius?: number;
|
|
53
|
-
/** 外扩环数量。 */
|
|
54
|
-
ringCount?: number;
|
|
55
|
-
/** 主颜色。 */
|
|
56
|
-
color?: string;
|
|
57
|
-
/** 核心填充色。 */
|
|
58
|
-
fillColor?: string;
|
|
59
|
-
/** 核心填充透明度。设为 0 可隐藏填充。 */
|
|
60
|
-
fillOpacity?: number;
|
|
61
|
-
/** 核心描边线及外扩同心环的线透明度。 */
|
|
62
|
-
lineOpacity?: number;
|
|
63
|
-
/** 环线宽度。 */
|
|
64
|
-
lineWidth?: number;
|
|
65
|
-
/** 一轮动画时长,单位毫秒。 */
|
|
66
|
-
duration?: number;
|
|
67
|
-
/** 核心呼吸缩放幅度。 */
|
|
68
|
-
pulseScale?: number;
|
|
69
|
-
}
|
|
70
|
-
/** 呼吸圆:适合叠在图标、设备点或目标点后面做柔和背景高亮。 */
|
|
71
|
-
export interface BreathingCircleOptions extends BaseEffectOptions {
|
|
72
|
-
/** 基础半径,单位米。 */
|
|
73
|
-
radius?: number;
|
|
74
|
-
/** 呼吸最小半径,单位米;不传时根据 radius 自动计算。 */
|
|
75
|
-
minRadius?: number;
|
|
76
|
-
/** 呼吸最大半径,单位米;不传时根据 radius 自动计算。 */
|
|
77
|
-
maxRadius?: number;
|
|
78
|
-
/** 主颜色。 */
|
|
79
|
-
color?: string;
|
|
80
|
-
/** 填充色,默认跟随 color。 */
|
|
81
|
-
fillColor?: string;
|
|
82
|
-
/** 最亮时填充透明度。 */
|
|
83
|
-
fillOpacity?: number;
|
|
84
|
-
/** 最暗时填充透明度。 */
|
|
85
|
-
minFillOpacity?: number;
|
|
86
|
-
/** 描边颜色,默认跟随 color。 */
|
|
87
|
-
strokeColor?: string;
|
|
88
|
-
/** 最亮时描边透明度。 */
|
|
89
|
-
strokeOpacity?: number;
|
|
90
|
-
/** 最暗时描边透明度。 */
|
|
91
|
-
minStrokeOpacity?: number;
|
|
92
|
-
/** 描边宽度,单位像素。设为 0 可隐藏描边。 */
|
|
93
|
-
strokeWidth?: number;
|
|
94
|
-
/** 一轮呼吸动画时长,单位毫秒。 */
|
|
95
|
-
duration?: number;
|
|
96
|
-
}
|
|
97
|
-
/** 扇形扫描渐变配置。colors 在扇形扫描效果中会从圆心沿半径方向过渡到外缘。在雷达扫描中,centerOpacity 会从圆心开始,edgeOpacity 会从外缘开始。 */
|
|
98
|
-
export interface SectorScanGradientOptions {
|
|
99
|
-
colors?: string[];
|
|
100
|
-
opacity?: number;
|
|
101
|
-
/** 圆心附近透明度;不传时使用基础透明度的 25%。 */
|
|
102
|
-
centerOpacity?: number;
|
|
103
|
-
/** 外缘透明度;不传时使用基础透明度。 */
|
|
104
|
-
edgeOpacity?: number;
|
|
105
|
-
}
|
|
106
|
-
/** 扇形扫描:给定起止角度,可选旋转速度和分段渐变。 */
|
|
107
|
-
export interface SectorScanOptions extends BaseEffectOptions {
|
|
108
|
-
/** 扇形半径,单位米。 */
|
|
109
|
-
radius: number;
|
|
110
|
-
/** 起始方位角,0 表示正北,顺时针增加。 */
|
|
111
|
-
startAngle: number;
|
|
112
|
-
/** 结束方位角,0 表示正北,顺时针增加。 */
|
|
113
|
-
endAngle: number;
|
|
114
|
-
/** 纯色填充颜色;未传 gradient.colors 时使用。 */
|
|
115
|
-
color?: string;
|
|
116
|
-
/** 纯色填充透明度,或渐变默认透明度。 */
|
|
117
|
-
opacity?: number;
|
|
118
|
-
/** 径向渐变配置;colors 至少两个颜色时启用 Canvas 渐变。 */
|
|
119
|
-
gradient?: SectorScanGradientOptions;
|
|
120
|
-
/** 扇形两条边线颜色。 */
|
|
121
|
-
outlineColor?: string;
|
|
122
|
-
/** 扇形边线透明度。 */
|
|
123
|
-
outlineOpacity?: number;
|
|
124
|
-
/** 扇形边线宽度。 */
|
|
125
|
-
outlineWidth?: number;
|
|
126
|
-
/** 旋转速度,单位度/秒;不传或为 0 时静止。 */
|
|
127
|
-
rotationSpeed?: number;
|
|
128
|
-
}
|
|
129
|
-
/** 定向脉冲:一组沿指定方向推进的弧线。 */
|
|
130
|
-
export interface DirectionalPulseOptions extends BaseEffectOptions {
|
|
131
|
-
/** 最大脉冲半径,单位米。 */
|
|
132
|
-
radius: number;
|
|
133
|
-
/** 中心方向角,0 表示正北。 */
|
|
134
|
-
direction?: number;
|
|
135
|
-
/** 扇形展开角度。 */
|
|
136
|
-
spread?: number;
|
|
137
|
-
/** 主颜色。 */
|
|
138
|
-
color?: string;
|
|
139
|
-
/** 线透明度。 */
|
|
140
|
-
opacity?: number;
|
|
141
|
-
/** 线宽。 */
|
|
142
|
-
lineWidth?: number;
|
|
143
|
-
/** 同屏弧线数量。 */
|
|
144
|
-
lineCount?: number;
|
|
145
|
-
/** 弧线间距,单位米。 */
|
|
146
|
-
lineSpacing?: number;
|
|
147
|
-
/** 推进速度,单位米/秒;不传时静止。 */
|
|
148
|
-
speed?: number;
|
|
149
|
-
/** 内侧起始半径,单位米。 */
|
|
150
|
-
innerRadius?: number;
|
|
151
|
-
}
|
|
152
|
-
/** 雷达扫描:距离环、十字线、距离文字和旋转扫描尾迹。 */
|
|
153
|
-
export interface RadarSweepOptions extends BaseEffectOptions {
|
|
154
|
-
/** 雷达半径,单位米。 */
|
|
155
|
-
radius: number;
|
|
156
|
-
/** 扫描主色。 */
|
|
157
|
-
color?: string;
|
|
158
|
-
/** 扫描面默认透明度。 */
|
|
159
|
-
opacity?: number;
|
|
160
|
-
/** 单个扫描扇形角度。 */
|
|
161
|
-
sweepAngle?: number;
|
|
162
|
-
/** 初始扫描起始角度。 */
|
|
163
|
-
sweepStartAngle?: number;
|
|
164
|
-
/** 旋转速度,单位度/秒。 */
|
|
165
|
-
rotationSpeed?: number;
|
|
166
|
-
/** 距离环数量。 */
|
|
167
|
-
ringCount?: number;
|
|
168
|
-
/** 距离环颜色。 */
|
|
169
|
-
ringColor?: string;
|
|
170
|
-
/** 距离环透明度。 */
|
|
171
|
-
ringOpacity?: number;
|
|
172
|
-
/** 距离环线宽。 */
|
|
173
|
-
ringWidth?: number;
|
|
174
|
-
/** 尾部透明度(渐变模式控制扫描起始边透明度)。 */
|
|
175
|
-
tailOpacity?: number;
|
|
176
|
-
/** 头部透明度(渐变模式控制扫描结束边透明度)。 */
|
|
177
|
-
headOpacity?: number;
|
|
178
|
-
/** 是否显示十字线。 */
|
|
179
|
-
showCrosshair?: boolean;
|
|
180
|
-
/** 十字线颜色。 */
|
|
181
|
-
crosshairColor?: string;
|
|
182
|
-
/** 十字线透明度。 */
|
|
183
|
-
crosshairOpacity?: number;
|
|
184
|
-
/** 十字线宽度。 */
|
|
185
|
-
crosshairWidth?: number;
|
|
186
|
-
/** 中心核心半径,单位米。 */
|
|
187
|
-
coreRadius?: number;
|
|
188
|
-
/** 中心核心颜色。 */
|
|
189
|
-
coreColor?: string;
|
|
190
|
-
/** 是否显示距离文字。 */
|
|
191
|
-
showDistanceLabels?: boolean;
|
|
192
|
-
/** 距离文字颜色。 */
|
|
193
|
-
distanceLabelColor?: string;
|
|
194
|
-
/** 距离文字 halo 颜色。 */
|
|
195
|
-
distanceLabelHaloColor?: string;
|
|
196
|
-
/** 距离文字透明度。 */
|
|
197
|
-
distanceLabelOpacity?: number;
|
|
198
|
-
/** 距离文字字号。 */
|
|
199
|
-
distanceLabelSize?: number;
|
|
200
|
-
/** 自定义距离文字格式化。 */
|
|
201
|
-
distanceLabelFormatter?: (distance: number, index: number) => string;
|
|
202
|
-
/** 径向渐变配置;colors 至少两个颜色时启用 Canvas 渐变渲染扫描区域。 */
|
|
203
|
-
gradient?: SectorScanGradientOptions;
|
|
204
|
-
}
|
|
205
|
-
/** 防御圆:静态地理圆,内部淡色填充经径向渐变过渡到边缘光晕,最外层叠加实心边框线,适合标识设备覆盖范围或防御区域。 */
|
|
206
|
-
export interface DefenceCircleOptions extends BaseEffectOptions {
|
|
207
|
-
/** 防御半径,单位米。 */
|
|
208
|
-
radius: number;
|
|
209
|
-
/** 主颜色。fillColor 和 borderColor 不传时默认跟随此值。 */
|
|
210
|
-
color?: string;
|
|
211
|
-
/** 内部填充色,不传时跟随 color。 */
|
|
212
|
-
fillColor?: string;
|
|
213
|
-
/** 内部填充透明度(渐变起始值)。 */
|
|
214
|
-
fillOpacity?: number;
|
|
215
|
-
/** 边框颜色,不传时跟随 color。 */
|
|
216
|
-
borderColor?: string;
|
|
217
|
-
/** 边框线宽,单位像素。 */
|
|
218
|
-
borderWidth?: number;
|
|
219
|
-
/** 边框线透明度(最外层实心边框)。 */
|
|
220
|
-
borderOpacity?: number;
|
|
221
|
-
}
|
|
222
|
-
/** 目标锁定:固定像素尺寸的四角锁定框和中心准星,适合跟随移动目标。 */
|
|
223
|
-
export interface TargetLockOptions extends BaseEffectOptions {
|
|
224
|
-
/** 锁定框颜色。 */
|
|
225
|
-
color?: string;
|
|
226
|
-
/** 锁定框尺寸,单位像素。 */
|
|
227
|
-
size?: number;
|
|
228
|
-
/** 线宽,单位像素。 */
|
|
229
|
-
lineWidth?: number;
|
|
230
|
-
/** 四角线段长度,单位像素。 */
|
|
231
|
-
cornerLength?: number;
|
|
232
|
-
/** 是否显示中心准星,默认 true。 */
|
|
233
|
-
showCrosshair?: boolean;
|
|
234
|
-
/** 中心准星单侧长度,单位像素。 */
|
|
235
|
-
crosshairLength?: number;
|
|
236
|
-
/** 准星与中心点之间的留白,单位像素。 */
|
|
237
|
-
crosshairGap?: number;
|
|
238
|
-
/** 是否旋转锁定框,默认 true。 */
|
|
239
|
-
rotate?: boolean;
|
|
240
|
-
/** 旋转一周时长,单位毫秒。 */
|
|
241
|
-
rotationDuration?: number;
|
|
242
|
-
/** 整体透明度。 */
|
|
243
|
-
opacity?: number;
|
|
244
|
-
}
|
|
245
|
-
/** 定向反制光束:由设备指向目标的收窄能量通道、粒子流和目标震荡环。 */
|
|
246
|
-
export interface CountermeasureBeamOptions extends BaseEffectOptions {
|
|
247
|
-
/** 反制目标经纬度。 */
|
|
248
|
-
target: LngLatTuple;
|
|
249
|
-
/** 反制模式。驱离时震荡环向外扩散,迫降时向目标收缩。 */
|
|
250
|
-
mode?: "expulsion" | "forcedLanding";
|
|
251
|
-
/** 主颜色。 */
|
|
252
|
-
color?: string;
|
|
253
|
-
/** 能量通道填充颜色,默认跟随 color。 */
|
|
254
|
-
channelColor?: string;
|
|
255
|
-
/** 能量通道透明度。 */
|
|
256
|
-
channelOpacity?: number;
|
|
257
|
-
/** 设备端通道宽度,单位米。 */
|
|
258
|
-
sourceWidth?: number;
|
|
259
|
-
/** 目标端通道宽度,单位米。 */
|
|
260
|
-
targetWidth?: number;
|
|
261
|
-
/** 中心束线颜色,默认使用偏亮的紫红色。 */
|
|
262
|
-
lineColor?: string;
|
|
263
|
-
/** 中心束线宽度,单位像素。 */
|
|
264
|
-
lineWidth?: number;
|
|
265
|
-
/** 中心束线透明度。 */
|
|
266
|
-
lineOpacity?: number;
|
|
267
|
-
/** 推进粒子颜色,默认跟随 lineColor。 */
|
|
268
|
-
particleColor?: string;
|
|
269
|
-
/** 同时显示的推进粒子数量;设为 0 可关闭。 */
|
|
270
|
-
particleCount?: number;
|
|
271
|
-
/** 粒子基础半径,单位像素。 */
|
|
272
|
-
particleRadius?: number;
|
|
273
|
-
/** 粒子从设备移动到目标所需时间,单位毫秒。 */
|
|
274
|
-
particleDuration?: number;
|
|
275
|
-
/** 是否显示目标端震荡环。 */
|
|
276
|
-
targetRipple?: boolean;
|
|
277
|
-
/** 目标端震荡环最大半径,单位米。 */
|
|
278
|
-
targetRippleRadius?: number;
|
|
279
|
-
/** 同时显示的震荡环数量。 */
|
|
280
|
-
targetRippleCount?: number;
|
|
281
|
-
/** 单轮震荡时长,单位毫秒。 */
|
|
282
|
-
targetRippleDuration?: number;
|
|
283
|
-
/** 震荡环线宽,单位像素。 */
|
|
284
|
-
targetRippleWidth?: number;
|
|
285
|
-
}
|
|
286
|
-
export type CoordinationLinkType = "detection" | "command" | "countermeasure";
|
|
287
|
-
export interface CoordinationLink {
|
|
288
|
-
/** 链路起点。 */
|
|
289
|
-
from: LngLatTuple;
|
|
290
|
-
/** 链路终点。 */
|
|
291
|
-
to: LngLatTuple;
|
|
292
|
-
/** 探测、指挥或反制链路。 */
|
|
293
|
-
type: CoordinationLinkType;
|
|
294
|
-
/** 覆盖该链路的默认颜色。 */
|
|
295
|
-
color?: string;
|
|
296
|
-
}
|
|
297
|
-
/** 多设备协同反制:展示探测、指挥和反制链路及其数据流向。 */
|
|
298
|
-
export interface CoordinatedCountermeasureOptions extends BaseEffectOptions {
|
|
299
|
-
/** 协同链路集合。center 表示当前处置目标位置。 */
|
|
300
|
-
links: CoordinationLink[];
|
|
301
|
-
/** 链路线宽,单位像素。 */
|
|
302
|
-
lineWidth?: number;
|
|
303
|
-
/** 链路透明度。 */
|
|
304
|
-
lineOpacity?: number;
|
|
305
|
-
/** 每条链路同时显示的流动粒子数量。 */
|
|
306
|
-
particleCount?: number;
|
|
307
|
-
/** 流动粒子半径,单位像素。 */
|
|
308
|
-
particleRadius?: number;
|
|
309
|
-
/** 粒子走完整条链路的时长,单位毫秒。 */
|
|
310
|
-
particleDuration?: number;
|
|
311
|
-
/** 是否显示链路端点。 */
|
|
312
|
-
showNodes?: boolean;
|
|
313
|
-
/** 链路端点半径,单位像素。 */
|
|
314
|
-
nodeRadius?: number;
|
|
315
|
-
/** 是否显示目标协同状态环。 */
|
|
316
|
-
targetRipple?: boolean;
|
|
317
|
-
/** 目标状态环最大半径,单位米。 */
|
|
318
|
-
targetRippleRadius?: number;
|
|
319
|
-
/** 目标状态环动画时长,单位毫秒。 */
|
|
320
|
-
targetRippleDuration?: number;
|
|
321
|
-
}
|
|
322
|
-
/** 导航诱骗:展示目标真实位置到诱导位置的偏移关系和诱导流向。 */
|
|
323
|
-
export interface NavigationSpoofingOptions extends BaseEffectOptions {
|
|
324
|
-
/** 后端或业务算法给出的诱导位置。center 表示目标真实位置。 */
|
|
325
|
-
spoofedPosition: LngLatTuple;
|
|
326
|
-
/** 主颜色。 */
|
|
327
|
-
color?: string;
|
|
328
|
-
/** 偏移虚线颜色,默认跟随 color。 */
|
|
329
|
-
lineColor?: string;
|
|
330
|
-
/** 偏移虚线宽度,单位像素。 */
|
|
331
|
-
lineWidth?: number;
|
|
332
|
-
/** 偏移虚线透明度。 */
|
|
333
|
-
lineOpacity?: number;
|
|
334
|
-
/** 诱导方向流动粒子数量。 */
|
|
335
|
-
particleCount?: number;
|
|
336
|
-
/** 粒子半径,单位像素。 */
|
|
337
|
-
particleRadius?: number;
|
|
338
|
-
/** 粒子从真实位置移动到诱导位置的时长,单位毫秒。 */
|
|
339
|
-
particleDuration?: number;
|
|
340
|
-
/** 是否显示真实位置点。 */
|
|
341
|
-
showTruePosition?: boolean;
|
|
342
|
-
/** 是否显示诱导位置虚影。 */
|
|
343
|
-
showSpoofedPosition?: boolean;
|
|
344
|
-
/** 诱导位置虚影半径,单位像素。 */
|
|
345
|
-
ghostRadius?: number;
|
|
346
|
-
/** 诱导位置虚影透明度。 */
|
|
347
|
-
ghostOpacity?: number;
|
|
348
|
-
/** 是否显示诱导位置脉冲环。 */
|
|
349
|
-
ripple?: boolean;
|
|
350
|
-
/** 诱导位置脉冲环最大半径,单位米。 */
|
|
351
|
-
rippleRadius?: number;
|
|
352
|
-
/** 同时显示的脉冲环数量。 */
|
|
353
|
-
rippleCount?: number;
|
|
354
|
-
/** 单轮脉冲动画时长,单位毫秒。 */
|
|
355
|
-
rippleDuration?: number;
|
|
356
|
-
}
|
|
357
|
-
/** 添加单点扩散脉冲特效。 */
|
|
358
|
-
export declare const addPulseMarker: (map: Map, options: PulseMarkerOptions) => MapEffectController<PulseMarkerOptions>;
|
|
359
|
-
/** 添加呼吸圆特效。 */
|
|
360
|
-
export declare const addBreathingCircle: (map: Map, options: BreathingCircleOptions) => MapEffectController<BreathingCircleOptions>;
|
|
361
|
-
/** 添加多环脉冲特效。 */
|
|
362
|
-
export declare const addRingPulseMarker: (map: Map, options: RingPulseMarkerOptions) => MapEffectController<RingPulseMarkerOptions>;
|
|
363
|
-
/** 添加扇形扫描特效。 */
|
|
364
|
-
export declare const addSectorScan: (map: Map, options: SectorScanOptions) => MapEffectController<SectorScanOptions>;
|
|
365
|
-
/** 添加定向脉冲特效。 */
|
|
366
|
-
export declare const addDirectionalPulse: (map: Map, options: DirectionalPulseOptions) => MapEffectController<DirectionalPulseOptions>;
|
|
367
|
-
/** 添加雷达扫描特效。 */
|
|
368
|
-
export declare const addRadarSweep: (map: Map, options: RadarSweepOptions) => MapEffectController<RadarSweepOptions>;
|
|
369
|
-
/** 添加防御圆特效。 */
|
|
370
|
-
export declare const addDefenceCircle: (map: Map, options: DefenceCircleOptions) => MapEffectController<DefenceCircleOptions>;
|
|
371
|
-
/** 添加定向反制光束。 */
|
|
372
|
-
export declare const addCountermeasureBeam: (map: Map, options: CountermeasureBeamOptions) => MapEffectController<CountermeasureBeamOptions>;
|
|
373
|
-
/** 添加多设备协同反制链路。 */
|
|
374
|
-
export declare const addCoordinatedCountermeasure: (map: Map, options: CoordinatedCountermeasureOptions) => MapEffectController<CoordinatedCountermeasureOptions>;
|
|
375
|
-
/** 添加导航诱骗位置偏移效果。 */
|
|
376
|
-
export declare const addNavigationSpoofing: (map: Map, options: NavigationSpoofingOptions) => MapEffectController<NavigationSpoofingOptions>;
|
|
377
|
-
/** 添加目标锁定框。锁定框使用 DOM Marker,缩放地图时保持固定像素尺寸。 */
|
|
378
|
-
export declare const addTargetLock: (map: Map, initialOptions: TargetLockOptions) => MapEffectController<TargetLockOptions>;
|
|
379
|
-
/** 围栏几何。
|
|
380
|
-
* 支持直接传入 edit 插件 getAll() 的 FeatureCollection(含多个围栏 feature),
|
|
381
|
-
* 也支持单个 Polygon / MultiPolygon / Feature,或多边形环坐标数组(外环在前)。
|
|
382
|
-
* 非 Polygon 几何(如 Point / LineString)会被忽略。 */
|
|
383
|
-
export type FenceGeometry = GeoJSON.Polygon | GeoJSON.MultiPolygon | GeoJSON.Feature<GeoJSON.Polygon | GeoJSON.MultiPolygon> | GeoJSON.FeatureCollection | LngLatTuple[][];
|
|
384
|
-
export interface BreachAlertOptions extends BaseEffectOptions {
|
|
385
|
-
/** 接触点经纬度,作为涟漪中心。trigger 时可传入覆盖。 */
|
|
386
|
-
center: LngLatTuple;
|
|
387
|
-
/** 围栏几何。围栏闪烁作用对象。 */
|
|
388
|
-
fence?: FenceGeometry;
|
|
389
|
-
/** 围栏正常态颜色(蓝/绿),默认 #1677ff。 */
|
|
390
|
-
fenceColor?: string;
|
|
391
|
-
/** 围栏填充色,默认跟随 fenceColor。 */
|
|
392
|
-
fenceFillColor?: string;
|
|
393
|
-
/** 围栏填充透明度,默认 0.1。 */
|
|
394
|
-
fenceFillOpacity?: number;
|
|
395
|
-
/** 围栏边框宽度,默认 2。 */
|
|
396
|
-
fenceBorderWidth?: number;
|
|
397
|
-
/** 围栏边框透明度,默认 0.9。 */
|
|
398
|
-
fenceBorderOpacity?: number;
|
|
399
|
-
/** 是否启用围栏高频闪烁警报,默认 true。 */
|
|
400
|
-
fenceFlash?: boolean;
|
|
401
|
-
/** 警报态颜色,默认 #ff3b30。 */
|
|
402
|
-
fenceAlertColor?: string;
|
|
403
|
-
/** 闪烁半周期 ms(亮→暗→亮),默认 200(高频)。 */
|
|
404
|
-
fenceFlashInterval?: number;
|
|
405
|
-
/** 是否启用接触点涟漪,默认 true。 */
|
|
406
|
-
ripple?: boolean;
|
|
407
|
-
/** 涟漪颜色,默认跟随 fenceAlertColor。 */
|
|
408
|
-
rippleColor?: string;
|
|
409
|
-
/** 涟漪最大扩散半径,单位米,默认 800。 */
|
|
410
|
-
rippleRadius?: number;
|
|
411
|
-
/** 同时扩散的环数,默认 3。 */
|
|
412
|
-
rippleCount?: number;
|
|
413
|
-
/** 单波扩散周期 ms(一个环从中心扩散到最大半径的时长),默认 1500。涟漪循环播放直到 reset。 */
|
|
414
|
-
rippleDuration?: number;
|
|
415
|
-
/** 涟漪线宽,默认 3。 */
|
|
416
|
-
rippleLineWidth?: number;
|
|
417
|
-
/** 是否启用战术框闪烁,默认 false。 */
|
|
418
|
-
tacticalFlash?: boolean;
|
|
419
|
-
/** 战术框范围,默认 'fullscreen'。'viewport' 表示内缩聚焦框。 */
|
|
420
|
-
tacticalScope?: "fullscreen" | "viewport";
|
|
421
|
-
/** 战术框颜色,默认跟随 fenceAlertColor。 */
|
|
422
|
-
tacticalColor?: string;
|
|
423
|
-
/** 边框粗细 px,默认 4。 */
|
|
424
|
-
tacticalBorderWidth?: number;
|
|
425
|
-
}
|
|
426
|
-
/** addBreachAlert 返回的控制器。在 MapEffectController 基础上扩展事件触发能力。 */
|
|
427
|
-
export interface BreachAlertController extends MapEffectController<BreachAlertOptions> {
|
|
428
|
-
/** 触发一次预警。传入接触点会覆盖 center;若已在警报中,先 reset 再触发。 */
|
|
429
|
-
trigger: (point?: LngLatTuple) => void;
|
|
430
|
-
/** 立即停止当前预警:围栏恢复原色、涟漪消散、战术框停止。 */
|
|
431
|
-
reset: () => void;
|
|
432
|
-
/** 当前是否处于警报中。 */
|
|
433
|
-
isActive: () => boolean;
|
|
434
|
-
}
|
|
435
|
-
/** 构造圆形围栏几何。
|
|
436
|
-
* GeoJSON 不支持 Circle 类型,这里用多边形近似(默认 64 段),
|
|
437
|
-
* 与 edit 插件画圆输出的格式一致,可直接作为 fence 传入。 */
|
|
438
|
-
export declare const createFenceCircle: (center: LngLatTuple, radius: number, segmentCount?: number) => GeoJSON.Polygon;
|
|
439
|
-
/** 添加围栏闯入预警特效。 */
|
|
440
|
-
export declare const addBreachAlert: (map: Map, initialOptions: BreachAlertOptions) => BreachAlertController;
|
|
441
|
-
export {};
|
|
1
|
+
export { addPulseMarker } from "./low-altitude/pulse-marker";
|
|
2
|
+
export { addBreathingCircle } from "./low-altitude/breathing-circle";
|
|
3
|
+
export { addRingPulseMarker } from "./low-altitude/ring-pulse-marker";
|
|
4
|
+
export { addSectorScan } from "./low-altitude/sector-scan";
|
|
5
|
+
export { addDirectionalPulse } from "./low-altitude/directional-pulse";
|
|
6
|
+
export { addRadarSweep } from "./low-altitude/radar-sweep";
|
|
7
|
+
export { addDefenceCircle } from "./low-altitude/defence-circle";
|
|
8
|
+
export { addCountermeasureBeam } from "./low-altitude/countermeasure-beam";
|
|
9
|
+
export { addCoordinatedCountermeasure } from "./low-altitude/coordinated-countermeasure";
|
|
10
|
+
export { addNavigationSpoofing } from "./low-altitude/navigation-spoofing";
|
|
11
|
+
export { addTargetLock } from "./low-altitude/target-lock";
|
|
12
|
+
export { addBreachAlert, createFenceCircle } from "./low-altitude/breach-alert";
|
|
13
|
+
export type { MapEffectController } from "./low-altitude/shared";
|
|
14
|
+
export type { PulseMarkerOptions, RingPulseMarkerOptions, BreathingCircleOptions, SectorScanGradientOptions, SectorScanOptions, DirectionalPulseOptions, RadarSweepOptions, DefenceCircleOptions, TargetLockOptions, CountermeasureBeamOptions, CoordinationLinkType, CoordinationLink, CoordinatedCountermeasureOptions, NavigationSpoofingOptions, } from "./low-altitude/types";
|
|
15
|
+
export type { FenceGeometry, BreachAlertOptions, BreachAlertController, } from "./low-altitude/breach-alert";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Map } from "maplibre-gl";
|
|
2
|
+
import type { ElectronicFenceController, StandardElectronicFenceLayerOptions } from "./electronic-fence-types";
|
|
3
|
+
/**
|
|
4
|
+
* 使用 MapLibre fill-extrusion/line 图层批量渲染电子围栏。
|
|
5
|
+
* 所有围栏共用一个 Source 和固定数量的 Layer,适合大数量稳定展示。
|
|
6
|
+
*/
|
|
7
|
+
export declare const addStandardElectronicFenceLayer: (map: Map, options: StandardElectronicFenceLayerOptions) => ElectronicFenceController;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Map } from "maplibre-gl";
|
|
2
|
+
import type { ElectronicFenceController, WebGLElectronicFenceLayerOptions } from "./electronic-fence-types";
|
|
3
|
+
/**
|
|
4
|
+
* 使用一个原生 WebGL CustomLayer 渲染带光晕和多条水平下行流光的高质量电子围栏。
|
|
5
|
+
* 该实现不依赖 Three.js,也不创建标准 fill-extrusion 围栏。
|
|
6
|
+
*/
|
|
7
|
+
export declare const addWebGLElectronicFenceLayer: (map: Map, options: WebGLElectronicFenceLayerOptions) => ElectronicFenceController;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export { getMaplibreToolsConfig, setMaplibreToolsConfig } from "./config";
|
|
|
2
2
|
export type { MaplibreToolsConfig } from "./config";
|
|
3
3
|
export { BASE_MAP_TYPES, getBaseMapStyle, getOpenFreeMapStyle, OPENFREEMAP_STYLE_BASE_URL, OPENFREEMAP_STYLES, OPENFREEMAP_STYLE_TYPES, isBaseMapType, setBaseMap, TDT_STYLE_TYPES, createTiandituImageStyle, createTiandituRasterSource, } from "./basemaps";
|
|
4
4
|
export type { BaseMapOptions, BaseMapType, OpenFreeMapStyleConfig, OpenFreeMapStyleType, TiandituLayerType, TiandituOptions, TiandituStyleOptions, } from "./basemaps";
|
|
5
|
-
export { addBreachAlert, addBreathingCircle, addCountermeasureBeam, addCoordinatedCountermeasure, addDefenceCircle, addDirectionalPulse, addNavigationSpoofing, addPulseMarker, addRingPulseMarker, addRadarSweep, addSectorScan, addTargetLock, createFenceCircle, } from "./effects";
|
|
6
|
-
export type { BreachAlertController, BreachAlertOptions, BreathingCircleOptions, CountermeasureBeamOptions, CoordinatedCountermeasureOptions, CoordinationLink, CoordinationLinkType, DefenceCircleOptions, DirectionalPulseOptions, FenceGeometry, MapEffectController, NavigationSpoofingOptions, PulseMarkerOptions, RingPulseMarkerOptions, RadarSweepOptions, SectorScanOptions, TargetLockOptions, } from "./effects";
|
|
5
|
+
export { addBreachAlert, addBreathingCircle, addCountermeasureBeam, addCoordinatedCountermeasure, addDefenceCircle, addDirectionalPulse, addNavigationSpoofing, addPulseMarker, addRingPulseMarker, addRadarSweep, addSectorScan, addTargetLock, createFenceCircle, addStandardElectronicFenceLayer, addWebGLElectronicFenceLayer, } from "./effects";
|
|
6
|
+
export type { BreachAlertController, BreachAlertOptions, BreathingCircleOptions, CountermeasureBeamOptions, CoordinatedCountermeasureOptions, CoordinationLink, CoordinationLinkType, DefenceCircleOptions, DirectionalPulseOptions, FenceGeometry, MapEffectController, NavigationSpoofingOptions, PulseMarkerOptions, RingPulseMarkerOptions, RadarSweepOptions, SectorScanOptions, TargetLockOptions, ElectronicFenceController, ElectronicFenceDefaults, ElectronicFenceFeature, ElectronicFenceFeatureCollection, ElectronicFenceFeaturePatch, ElectronicFenceInteractionEvent, ElectronicFenceProperties, ElectronicFenceRendererType, ElectronicFenceStateStyles, ElectronicFenceStatus, ElectronicFenceVisualState, StandardElectronicFenceLayerOptions, StandardElectronicFenceStyleOptions, WebGLElectronicFenceAnimationOptions, WebGLElectronicFenceLayerOptions, WebGLElectronicFenceStyleOptions, } from "./effects";
|
|
7
7
|
export { createMap, maplibregl } from "./map";
|
|
8
8
|
export type { CreateMapOptions } from "./map";
|
|
9
9
|
export type { GeoJSONSourceSpecification, LayerSpecification, Map, MapOptions, RasterSourceSpecification, SourceSpecification, StyleSpecification, } from "maplibre-gl";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import maplibregl, { type Map, type MapOptions, type StyleSpecification } from "maplibre-gl";
|
|
1
|
+
import maplibregl, { type Map, type MapOptions, type ProjectionSpecification, type StyleSpecification } from "maplibre-gl";
|
|
2
2
|
import { type BaseMapType } from "../basemaps";
|
|
3
3
|
export interface CreateMapOptions extends Omit<MapOptions, "container" | "style"> {
|
|
4
4
|
container: string | HTMLElement;
|
|
@@ -6,6 +6,7 @@ export interface CreateMapOptions extends Omit<MapOptions, "container" | "style"
|
|
|
6
6
|
style?: BaseMapType | string | StyleSpecification;
|
|
7
7
|
/** 只在使用天地图底图时需要;优先级高于全局配置。 */
|
|
8
8
|
tdtToken?: string;
|
|
9
|
+
projection?: ProjectionSpecification["type"];
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
11
12
|
* 创建 MapLibre 地图实例。
|