@gis_victory/gismap 1.0.35 → 1.0.36
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/dist/index.es.js +19 -9
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -82494,6 +82494,8 @@ class RadarManager {
|
|
|
82494
82494
|
// 边框颜色
|
|
82495
82495
|
borderWidth = 2;
|
|
82496
82496
|
// 边框宽度
|
|
82497
|
+
sectorVisible = false;
|
|
82498
|
+
// 扇形是否可见
|
|
82497
82499
|
sectorAngle = 30;
|
|
82498
82500
|
// 扫描扇形角度(度)
|
|
82499
82501
|
sectorColor = "rgba(0,255,0,0.4)";
|
|
@@ -82523,6 +82525,9 @@ class RadarManager {
|
|
|
82523
82525
|
if (options.borderWidth) {
|
|
82524
82526
|
this.borderWidth = options.borderWidth;
|
|
82525
82527
|
}
|
|
82528
|
+
if (options.sectorVisible) {
|
|
82529
|
+
this.sectorVisible = options.sectorVisible;
|
|
82530
|
+
}
|
|
82526
82531
|
if (options.sectorAngle) {
|
|
82527
82532
|
this.sectorAngle = options.sectorAngle;
|
|
82528
82533
|
}
|
|
@@ -82566,19 +82571,24 @@ class RadarManager {
|
|
|
82566
82571
|
"line-width": this.borderWidth
|
|
82567
82572
|
}
|
|
82568
82573
|
});
|
|
82569
|
-
this.
|
|
82570
|
-
|
|
82571
|
-
|
|
82572
|
-
|
|
82573
|
-
|
|
82574
|
-
|
|
82575
|
-
|
|
82576
|
-
|
|
82577
|
-
|
|
82574
|
+
if (this.sectorVisible) {
|
|
82575
|
+
this.map?.addLayer({
|
|
82576
|
+
id: this.id + "-sector-fill",
|
|
82577
|
+
type: "fill",
|
|
82578
|
+
source: this.id + "-sector",
|
|
82579
|
+
paint: {
|
|
82580
|
+
"fill-color": this.sectorColor,
|
|
82581
|
+
"fill-outline-color": this.sectorBorderColor
|
|
82582
|
+
}
|
|
82583
|
+
});
|
|
82584
|
+
}
|
|
82578
82585
|
return this;
|
|
82579
82586
|
}
|
|
82580
82587
|
// 扫描
|
|
82581
82588
|
startScan() {
|
|
82589
|
+
if (!this.sectorVisible) {
|
|
82590
|
+
return this;
|
|
82591
|
+
}
|
|
82582
82592
|
this.stopScan();
|
|
82583
82593
|
let startTime = performance.now();
|
|
82584
82594
|
const animate = (time) => {
|