bbj-screen-widget 2.4.63 → 2.4.64
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/bbj-screen-widget.d.ts +34 -33
- package/bbj-screen-widget.metadata.json +1 -1
- package/bundles/bbj-screen-widget.umd.js +719 -347
- package/bundles/bbj-screen-widget.umd.js.map +1 -1
- package/bundles/bbj-screen-widget.umd.min.js +1 -1
- package/bundles/bbj-screen-widget.umd.min.js.map +1 -1
- package/esm2015/bbj-screen-widget.js +35 -34
- package/esm2015/lib/custom-baidu-map/baidu-fence/baidu-fence.component.js +400 -0
- package/esm2015/lib/custom-baidu-map/baidu-marker-layer/baidu-marker-layer.component.js +1 -27
- package/esm2015/lib/custom-baidu-map/base-layer.js +27 -1
- package/esm2015/lib/custom-baidu-map/custom-baidu-map.component.js +11 -4
- package/esm2015/lib/custom-baidu-map/custom-baidu-map.module.js +6 -1
- package/fesm2015/bbj-screen-widget.js +441 -38
- package/fesm2015/bbj-screen-widget.js.map +1 -1
- package/lib/custom-baidu-map/baidu-fence/baidu-fence.component.d.ts +29 -0
- package/lib/custom-baidu-map/baidu-marker-layer/baidu-marker-layer.component.d.ts +0 -1
- package/lib/custom-baidu-map/base-layer.d.ts +1 -0
- package/package.json +2 -1
|
@@ -13287,7 +13287,8 @@ let CustomBaiduMapComponent = class CustomBaiduMapComponent {
|
|
|
13287
13287
|
this.dataChange.emit(center);
|
|
13288
13288
|
});
|
|
13289
13289
|
this.map.addEventListener('click', (event) => {
|
|
13290
|
-
|
|
13290
|
+
console.log(event);
|
|
13291
|
+
this.mapClick.emit(event.latlng);
|
|
13291
13292
|
});
|
|
13292
13293
|
this.map.addEventListener('zoomend', (event) => {
|
|
13293
13294
|
this.zoomChange.emit(this.map.getZoom());
|
|
@@ -13554,7 +13555,7 @@ CustomBaiduMapComponent.decorators = [
|
|
|
13554
13555
|
{ type: Component, args: [{
|
|
13555
13556
|
selector: 'sc-custom-baidu-map',
|
|
13556
13557
|
template: "<ng-template *ngFor=\"let child of children\" widget-host [widget]=\"child\"></ng-template>\n\n<!-- {{children|json}} -->\n<!-- <div class=\"map-container\" [ngStyle]=\"containerStyle\"> -->\n<div #container class=\"map\"></div>\n<nz-radio-group\n *ngIf=\"showMapTypeRadio\"\n class=\"map-type-radio\"\n [(ngModel)]=\"mapTypeValue\"\n (ngModelChange)=\"mapTypeChange($event)\"\n nzButtonStyle=\"solid\"\n>\n <label *ngFor=\"let item of mapTypeEnum\" nz-radio-button [nzValue]=\"item.value\">{{ item.label }}</label>\n</nz-radio-group>\n<!-- </div> -->\n",
|
|
13557
|
-
styles: [":host{display:block;height:100%;width:100%;overflow:hidden;transform-origin:0 0;z-index:0;pointer-events:none}:host>*{pointer-events:auto}.map{height:100%;width:100%}:host::ng-deep .BMap_bubble_pop{background-color:var(--info-window-background,#fff)!important;border-color:var(--info-window-border-color,#ddd)!important}:host::ng-deep .BMap_bubble_content{color:var(--info-window-color,\"#555555\")!important}:host::ng-deep .BMap_pop div{background-color:var(--info-window-background,#fff)!important}:host::ng-deep .BMap_pop>div:nth-child(8){background-color:transparent!important}:host.hideInfoWindowTail::ng-deep .BMap_bubble_pop>img,:host.hideInfoWindowTail::ng-deep .BMap_pop>div:nth-child(8),:host::ng-deep img[src$=\"/image/api/iws3.png\"]{display:none}:host.hideInfoWindowTop::ng-deep .BMap_bubble_pop{transform:translateY(31px)}:host.hideInfoWindowTop::ng-deep .BMap_bubble_pop>img{transform:translateY(-31px)}:host.hideInfoWindowTop::ng-deep .BMap_bubble_top,:host::ng-deep .anchorBL{display:none}.map-type-radio{position:absolute;bottom:20px;right:20px;z-index:10}"]
|
|
13558
|
+
styles: [":host{display:block;height:100%;width:100%;overflow:hidden;transform-origin:0 0;z-index:0;pointer-events:none}:host>*{pointer-events:auto}.map{height:100%;width:100%}:host::ng-deep .BMap_bubble_pop{background-color:var(--info-window-background,#fff)!important;border-color:var(--info-window-border-color,#ddd)!important}:host::ng-deep .BMap_bubble_content{color:var(--info-window-color,\"#555555\")!important}:host::ng-deep .BMap_pop div{background-color:var(--info-window-background,#fff)!important}:host::ng-deep .BMap_pop>div:nth-child(8){background-color:transparent!important}:host.hideInfoWindowTail::ng-deep .BMap_bubble_pop>img,:host.hideInfoWindowTail::ng-deep .BMap_pop>div:nth-child(8),:host::ng-deep .BMap_noprint.anchorTR,:host::ng-deep img[src$=\"/image/api/iws3.png\"]{display:none}:host.hideInfoWindowTop::ng-deep .BMap_bubble_pop{transform:translateY(31px)}:host.hideInfoWindowTop::ng-deep .BMap_bubble_pop>img{transform:translateY(-31px)}:host.hideInfoWindowTop::ng-deep .BMap_bubble_top,:host::ng-deep .anchorBL{display:none}.map-type-radio{position:absolute;bottom:20px;right:20px;z-index:10}"]
|
|
13558
13559
|
},] }
|
|
13559
13560
|
];
|
|
13560
13561
|
CustomBaiduMapComponent.ctorParameters = () => [
|
|
@@ -13741,7 +13742,13 @@ CustomBaiduMapComponent = __decorate([
|
|
|
13741
13742
|
hideChild: true,
|
|
13742
13743
|
},
|
|
13743
13744
|
],
|
|
13744
|
-
childTypes: [
|
|
13745
|
+
childTypes: [
|
|
13746
|
+
'sc-baidu-marker-layer',
|
|
13747
|
+
'sc-baidu-polyline-layer',
|
|
13748
|
+
'sc-wind-layer',
|
|
13749
|
+
'sc-typhoon-area-layer',
|
|
13750
|
+
'sc-baidu-fence',
|
|
13751
|
+
],
|
|
13745
13752
|
description: 'hasChildItem',
|
|
13746
13753
|
}),
|
|
13747
13754
|
__metadata("design:paramtypes", [BaiduMapService,
|
|
@@ -14120,6 +14127,32 @@ class BaseLayer {
|
|
|
14120
14127
|
this.layers = [];
|
|
14121
14128
|
}
|
|
14122
14129
|
}
|
|
14130
|
+
getTextOptions(font) {
|
|
14131
|
+
const textOptions = {};
|
|
14132
|
+
if (font) {
|
|
14133
|
+
if (font.size)
|
|
14134
|
+
textOptions.fontSize = font.size;
|
|
14135
|
+
if (font.family)
|
|
14136
|
+
textOptions.fontFamily = font.family;
|
|
14137
|
+
if (font.color)
|
|
14138
|
+
textOptions.color = font.color;
|
|
14139
|
+
// switch (font.weight) {
|
|
14140
|
+
// case 'lighter':
|
|
14141
|
+
// textOptions.lineWidth = 1;
|
|
14142
|
+
// break;
|
|
14143
|
+
// case 'normal':
|
|
14144
|
+
// textOptions.lineWidth = 2;
|
|
14145
|
+
// break;
|
|
14146
|
+
// case 'bold':
|
|
14147
|
+
// textOptions.lineWidth = 3;
|
|
14148
|
+
// break;
|
|
14149
|
+
// case 'bolder':
|
|
14150
|
+
// textOptions.lineWidth = 4;
|
|
14151
|
+
// break;
|
|
14152
|
+
// }
|
|
14153
|
+
}
|
|
14154
|
+
return textOptions;
|
|
14155
|
+
}
|
|
14123
14156
|
}
|
|
14124
14157
|
BaseLayer.decorators = [
|
|
14125
14158
|
{ type: Directive }
|
|
@@ -14429,32 +14462,6 @@ let BaiduMarkerLayerComponent = class BaiduMarkerLayerComponent extends BaseLaye
|
|
|
14429
14462
|
};
|
|
14430
14463
|
return iconOptions;
|
|
14431
14464
|
}
|
|
14432
|
-
getTextOptions(font) {
|
|
14433
|
-
const textOptions = {};
|
|
14434
|
-
if (font) {
|
|
14435
|
-
if (font.size)
|
|
14436
|
-
textOptions.fontSize = font.size;
|
|
14437
|
-
if (font.family)
|
|
14438
|
-
textOptions.fontFamily = font.family;
|
|
14439
|
-
if (font.color)
|
|
14440
|
-
textOptions.color = font.color;
|
|
14441
|
-
// switch (font.weight) {
|
|
14442
|
-
// case 'lighter':
|
|
14443
|
-
// textOptions.lineWidth = 1;
|
|
14444
|
-
// break;
|
|
14445
|
-
// case 'normal':
|
|
14446
|
-
// textOptions.lineWidth = 2;
|
|
14447
|
-
// break;
|
|
14448
|
-
// case 'bold':
|
|
14449
|
-
// textOptions.lineWidth = 3;
|
|
14450
|
-
// break;
|
|
14451
|
-
// case 'bolder':
|
|
14452
|
-
// textOptions.lineWidth = 4;
|
|
14453
|
-
// break;
|
|
14454
|
-
// }
|
|
14455
|
-
}
|
|
14456
|
-
return textOptions;
|
|
14457
|
-
}
|
|
14458
14465
|
addPickEvent(options) {
|
|
14459
14466
|
options.enablePicked = true;
|
|
14460
14467
|
options.onClick = ({ dataItem }) => {
|
|
@@ -15249,6 +15256,399 @@ TyphoonAreaLayerComponent = __decorate([
|
|
|
15249
15256
|
__metadata("design:paramtypes", [CustomBaiduMapComponent, NgZone])
|
|
15250
15257
|
], TyphoonAreaLayerComponent);
|
|
15251
15258
|
|
|
15259
|
+
const EARTH_RADIUS$1 = 6371393;
|
|
15260
|
+
const ɵ0$c = { type: 'string', title: 'ID' };
|
|
15261
|
+
let BaiduFenceComponent = class BaiduFenceComponent extends BaseLayer {
|
|
15262
|
+
constructor() {
|
|
15263
|
+
super(...arguments);
|
|
15264
|
+
// @Property('标签字体', { ui: { widget: 'myFont', visibleIf: { showLabel: [true] } } })
|
|
15265
|
+
// textFont: any = {
|
|
15266
|
+
// family: '',
|
|
15267
|
+
// color: '#000000',
|
|
15268
|
+
// weight: 'normal',
|
|
15269
|
+
// size: 16,
|
|
15270
|
+
// space: 0,
|
|
15271
|
+
// lineHeight: 0,
|
|
15272
|
+
// };
|
|
15273
|
+
this.lineWidth = 2;
|
|
15274
|
+
this.lineColor = 'rgb(50, 133, 255)';
|
|
15275
|
+
this.fillColor = 'rgba(248, 231, 28, 0.2)';
|
|
15276
|
+
this.showDrawButton = true;
|
|
15277
|
+
this.data = [
|
|
15278
|
+
{
|
|
15279
|
+
// name: '多边形',
|
|
15280
|
+
type: 'polygon',
|
|
15281
|
+
lnglat: '120.7,28;120.8,28;120.8,27.9;120.7,27.9',
|
|
15282
|
+
},
|
|
15283
|
+
{
|
|
15284
|
+
// name: '圆形',
|
|
15285
|
+
type: 'circle',
|
|
15286
|
+
lnglat: '120.6,27.9',
|
|
15287
|
+
radius: 5000,
|
|
15288
|
+
},
|
|
15289
|
+
];
|
|
15290
|
+
this.create = new EventEmitter();
|
|
15291
|
+
this.editData = [];
|
|
15292
|
+
this.stopEdit$ = new Subject();
|
|
15293
|
+
}
|
|
15294
|
+
ngOnInit() {
|
|
15295
|
+
const _super = Object.create(null, {
|
|
15296
|
+
ngOnInit: { get: () => super.ngOnInit }
|
|
15297
|
+
});
|
|
15298
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15299
|
+
_super.ngOnInit.call(this);
|
|
15300
|
+
// await this.parent.init$;
|
|
15301
|
+
// this.startDraw();
|
|
15302
|
+
});
|
|
15303
|
+
}
|
|
15304
|
+
ngOnDestroy() {
|
|
15305
|
+
var _a;
|
|
15306
|
+
super.ngOnDestroy();
|
|
15307
|
+
this.stopDraw();
|
|
15308
|
+
(_a = this.scene) === null || _a === void 0 ? void 0 : _a.clearData();
|
|
15309
|
+
}
|
|
15310
|
+
createLayers() {
|
|
15311
|
+
this.layer = new mapvgl.PolygonLayer({
|
|
15312
|
+
renderOrder: -1,
|
|
15313
|
+
lineColor: this.lineColor,
|
|
15314
|
+
lineWidth: this.lineWidth,
|
|
15315
|
+
fillColor: this.fillColor,
|
|
15316
|
+
});
|
|
15317
|
+
// this.textLayer = new mapvgl.TextLayer({
|
|
15318
|
+
// renderOrder: -1,
|
|
15319
|
+
// ...this.getTextOptions(this.textFont),
|
|
15320
|
+
// });
|
|
15321
|
+
return [this.layer];
|
|
15322
|
+
}
|
|
15323
|
+
updateData() {
|
|
15324
|
+
const data = [];
|
|
15325
|
+
this.data.forEach((r) => {
|
|
15326
|
+
if (r.type === 'circle') {
|
|
15327
|
+
// const radius = (r.radius * 180) / EARTH_RADIUS / Math.PI;
|
|
15328
|
+
// // let radius = cradius / 90;
|
|
15329
|
+
// let pointNum = 90;
|
|
15330
|
+
// let startAngle = 0;
|
|
15331
|
+
// let endAngle = Math.PI * 2;
|
|
15332
|
+
// let points = [];
|
|
15333
|
+
// const lnglat = r.lnglat.split(',');
|
|
15334
|
+
// const lng = +lnglat[0];
|
|
15335
|
+
// const lat = +lnglat[1];
|
|
15336
|
+
// for (var i = 0; i <= pointNum; i++) {
|
|
15337
|
+
// const angle = startAngle + ((endAngle - startAngle) * i) / pointNum;
|
|
15338
|
+
// const x = lng + (radius * Math.cos(angle)) / Math.abs(Math.cos((lat * Math.PI) / 180));
|
|
15339
|
+
// const y = lat + radius * Math.sin(angle);
|
|
15340
|
+
// points.push([x, y]);
|
|
15341
|
+
// }
|
|
15342
|
+
// data.push({
|
|
15343
|
+
// geometry: {
|
|
15344
|
+
// type: 'Polygon',
|
|
15345
|
+
// coordinates: [points],
|
|
15346
|
+
// },
|
|
15347
|
+
// });
|
|
15348
|
+
let pointsCount = 90;
|
|
15349
|
+
const radius = r.radius;
|
|
15350
|
+
const lnglat = r.lnglat.split(',');
|
|
15351
|
+
const centerLng = +lnglat[0];
|
|
15352
|
+
const centerLat = +lnglat[1];
|
|
15353
|
+
// 转换中心点纬度为弧度
|
|
15354
|
+
const centerLatRad = (centerLat * Math.PI) / 180;
|
|
15355
|
+
// 存储轨迹点的数组
|
|
15356
|
+
const trajectory = [];
|
|
15357
|
+
// 遍历 0~360°,生成等间隔的点
|
|
15358
|
+
for (let i = 0; i < pointsCount; i++) {
|
|
15359
|
+
// 计算当前点的方位角(弧度):从0°到360°,均分pointsCount份
|
|
15360
|
+
const angleRad = (i * 360 / pointsCount) * Math.PI / 180;
|
|
15361
|
+
// 计算当前点相对于中心点的经纬度增量(弧度)
|
|
15362
|
+
const deltaLatRad = (radius * Math.cos(angleRad)) / EARTH_RADIUS$1;
|
|
15363
|
+
const deltaLngRad = (radius * Math.sin(angleRad)) / (EARTH_RADIUS$1 * Math.cos(centerLatRad));
|
|
15364
|
+
// 转换为角度,并计算新坐标
|
|
15365
|
+
const newLat = centerLat + (deltaLatRad * 180) / Math.PI;
|
|
15366
|
+
const newLng = centerLng + (deltaLngRad * 180) / Math.PI;
|
|
15367
|
+
// 添加到轨迹数组(保留6位小数,经纬度常规精度)
|
|
15368
|
+
trajectory.push([parseFloat(newLng.toFixed(6)), parseFloat(newLat.toFixed(6))]);
|
|
15369
|
+
}
|
|
15370
|
+
data.push({
|
|
15371
|
+
geometry: {
|
|
15372
|
+
type: 'Polygon',
|
|
15373
|
+
coordinates: [trajectory],
|
|
15374
|
+
},
|
|
15375
|
+
});
|
|
15376
|
+
}
|
|
15377
|
+
else {
|
|
15378
|
+
const coordinates = r.lnglat.split(';').map((r) => {
|
|
15379
|
+
const lnglat = r.split(',');
|
|
15380
|
+
return [+lnglat[0], +lnglat[1]];
|
|
15381
|
+
});
|
|
15382
|
+
data.push({
|
|
15383
|
+
geometry: {
|
|
15384
|
+
type: 'Polygon',
|
|
15385
|
+
coordinates: [coordinates],
|
|
15386
|
+
},
|
|
15387
|
+
});
|
|
15388
|
+
}
|
|
15389
|
+
});
|
|
15390
|
+
this.layer.setData(data);
|
|
15391
|
+
}
|
|
15392
|
+
startDraw(type) {
|
|
15393
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15394
|
+
const { DrawScene, PolygonDraw, CircleDraw, OperateEventType } = yield import('bmap-draw');
|
|
15395
|
+
if (!this.scene) {
|
|
15396
|
+
this.scene = new DrawScene(this.parent.map, { noLimit: true });
|
|
15397
|
+
this.scene.addEventListener(OperateEventType.COMPLETE, (e) => {
|
|
15398
|
+
console.log(e);
|
|
15399
|
+
if (e.target.overlay.radius) {
|
|
15400
|
+
const radius = e.target.overlay.radius;
|
|
15401
|
+
const lnglat = e.target.overlay.latLng;
|
|
15402
|
+
const data = {
|
|
15403
|
+
type: 'circle',
|
|
15404
|
+
lnglat: `${lnglat.lng},${lnglat.lat}`,
|
|
15405
|
+
radius: radius,
|
|
15406
|
+
};
|
|
15407
|
+
this.data.push(data);
|
|
15408
|
+
this.updateData();
|
|
15409
|
+
this.create.emit(data);
|
|
15410
|
+
}
|
|
15411
|
+
else {
|
|
15412
|
+
const points = e.target.overlay.getPoints();
|
|
15413
|
+
if (!this.data) {
|
|
15414
|
+
this.data = [];
|
|
15415
|
+
}
|
|
15416
|
+
const data = {
|
|
15417
|
+
type: 'polygon',
|
|
15418
|
+
lnglat: points.map((p) => `${p.latLng.lng},${p.latLng.lat}`).join(';'),
|
|
15419
|
+
};
|
|
15420
|
+
this.create.emit(data);
|
|
15421
|
+
}
|
|
15422
|
+
});
|
|
15423
|
+
}
|
|
15424
|
+
switch (type) {
|
|
15425
|
+
case 'polygon':
|
|
15426
|
+
if (!this.polygon) {
|
|
15427
|
+
this.polygon = new PolygonDraw(this.scene, {
|
|
15428
|
+
autoViewport: true,
|
|
15429
|
+
hideTip: false,
|
|
15430
|
+
isSeries: true,
|
|
15431
|
+
isOpen: true,
|
|
15432
|
+
baseOpts: {
|
|
15433
|
+
fillColor: this.fillColor,
|
|
15434
|
+
strokeWeight: this.lineWidth,
|
|
15435
|
+
strokeColor: this.lineColor,
|
|
15436
|
+
},
|
|
15437
|
+
});
|
|
15438
|
+
}
|
|
15439
|
+
this.polygon.open();
|
|
15440
|
+
break;
|
|
15441
|
+
case 'circle':
|
|
15442
|
+
if (!this.circle) {
|
|
15443
|
+
this.circle = new CircleDraw(this.scene, {
|
|
15444
|
+
autoViewport: true,
|
|
15445
|
+
isOpen: true,
|
|
15446
|
+
isSeries: true,
|
|
15447
|
+
// labelOptions: {
|
|
15448
|
+
// borderRadius: '2px',
|
|
15449
|
+
// background: '#b5d3fb',
|
|
15450
|
+
// border: '1px solid #b5d3fb',
|
|
15451
|
+
// color: '#333',
|
|
15452
|
+
// fontSize: '12px',
|
|
15453
|
+
// letterSpacing: '0',
|
|
15454
|
+
// padding: '5px',
|
|
15455
|
+
// },
|
|
15456
|
+
baseOpts: {
|
|
15457
|
+
fillColor: this.fillColor,
|
|
15458
|
+
strokeWeight: this.lineWidth,
|
|
15459
|
+
strokeColor: this.lineColor,
|
|
15460
|
+
},
|
|
15461
|
+
});
|
|
15462
|
+
}
|
|
15463
|
+
this.circle.open();
|
|
15464
|
+
break;
|
|
15465
|
+
}
|
|
15466
|
+
// this.stopDraw();
|
|
15467
|
+
// this.editData = [];
|
|
15468
|
+
// this.editLayer = new mapvgl.IconLayer({
|
|
15469
|
+
// width: 20 / 2,
|
|
15470
|
+
// height: 30.6 / 2,
|
|
15471
|
+
// offset: [0, -30.6 / 2 / 2],
|
|
15472
|
+
// icon: 'assets/img/screen/marker.png',
|
|
15473
|
+
// enablePicked: true, // 是否可以拾取
|
|
15474
|
+
// selectedIndex: -1, // 选中项
|
|
15475
|
+
// selectedColor: '#ff0000', // 选中项颜色
|
|
15476
|
+
// autoSelect: true, // 根据鼠标位置来自动设置选中项
|
|
15477
|
+
// onRightClick: (e) => {
|
|
15478
|
+
// console.log('right click', e);
|
|
15479
|
+
// this.editData.splice(e.dataIndex, 1);
|
|
15480
|
+
// this.updateEditData();
|
|
15481
|
+
// },
|
|
15482
|
+
// });
|
|
15483
|
+
// this.parent.addLayer(this.editLayer);
|
|
15484
|
+
// this.editLineLayer = new mapvgl.SimpleLineLayer({
|
|
15485
|
+
// color: 'rgba(50, 50, 200, 1)',
|
|
15486
|
+
// blend: 'lighter',
|
|
15487
|
+
// data: [
|
|
15488
|
+
// {
|
|
15489
|
+
// geometry: {
|
|
15490
|
+
// type: 'LineString',
|
|
15491
|
+
// coordinates: [
|
|
15492
|
+
// [116.394191, 39.91334],
|
|
15493
|
+
// [116.417259, 39.913672],
|
|
15494
|
+
// ],
|
|
15495
|
+
// },
|
|
15496
|
+
// },
|
|
15497
|
+
// ],
|
|
15498
|
+
// });
|
|
15499
|
+
// this.parent.addLayer(this.editLineLayer);
|
|
15500
|
+
// this.parent.mapClick.pipe(takeUntil(this.stopEdit$)).subscribe((point) => {
|
|
15501
|
+
// this.editData.push([point.lng, point.lat]);
|
|
15502
|
+
// // this.editData.push({
|
|
15503
|
+
// // geometry: {
|
|
15504
|
+
// // type: 'Point',
|
|
15505
|
+
// // coordinates: [point.lng, point.lat],
|
|
15506
|
+
// // },
|
|
15507
|
+
// // });
|
|
15508
|
+
// this.updateEditData();
|
|
15509
|
+
// });
|
|
15510
|
+
});
|
|
15511
|
+
}
|
|
15512
|
+
updateEditData() {
|
|
15513
|
+
if (this.editLayer) {
|
|
15514
|
+
this.editLayer.setData(this.editData.map((r) => ({ geometry: { type: 'Point', coordinates: r } })));
|
|
15515
|
+
}
|
|
15516
|
+
if (this.editLineLayer) {
|
|
15517
|
+
this.editLineLayer.setData([
|
|
15518
|
+
{
|
|
15519
|
+
geometry: {
|
|
15520
|
+
type: 'LineString',
|
|
15521
|
+
coordinates: this.editData,
|
|
15522
|
+
},
|
|
15523
|
+
},
|
|
15524
|
+
]);
|
|
15525
|
+
}
|
|
15526
|
+
}
|
|
15527
|
+
stopDraw() {
|
|
15528
|
+
var _a;
|
|
15529
|
+
(_a = this.scene) === null || _a === void 0 ? void 0 : _a.close();
|
|
15530
|
+
// this.stopEdit$.next();
|
|
15531
|
+
// if (this.editLayer) {
|
|
15532
|
+
// this.parent.removeLayer(this.editLayer);
|
|
15533
|
+
// this.editLayer = null;
|
|
15534
|
+
// }
|
|
15535
|
+
// if (this.editLineLayer) {
|
|
15536
|
+
// this.parent.removeLayer(this.editLineLayer);
|
|
15537
|
+
// this.editLineLayer = null;
|
|
15538
|
+
// }
|
|
15539
|
+
// if (this.editData?.length >= 3) {
|
|
15540
|
+
// if (!this.data) {
|
|
15541
|
+
// this.data = [];
|
|
15542
|
+
// }
|
|
15543
|
+
// const data = {
|
|
15544
|
+
// type: 'polygon',
|
|
15545
|
+
// lnglat: this.editData.map((r) => r.join(',')).join(';'),
|
|
15546
|
+
// };
|
|
15547
|
+
// this.data.push(data);
|
|
15548
|
+
// this.updateData();
|
|
15549
|
+
// this.create.emit(data);
|
|
15550
|
+
// }
|
|
15551
|
+
// this.editData = null;
|
|
15552
|
+
}
|
|
15553
|
+
search() {
|
|
15554
|
+
if (!this.searchText) {
|
|
15555
|
+
}
|
|
15556
|
+
var local = new BMapGL.LocalSearch(this.parent.map, {
|
|
15557
|
+
//智能搜索
|
|
15558
|
+
onSearchComplete: (res) => {
|
|
15559
|
+
console.log(res, local);
|
|
15560
|
+
},
|
|
15561
|
+
});
|
|
15562
|
+
local.search(this.searchText);
|
|
15563
|
+
}
|
|
15564
|
+
};
|
|
15565
|
+
BaiduFenceComponent.decorators = [
|
|
15566
|
+
{ type: Component, args: [{
|
|
15567
|
+
selector: 'sc-baidu-fence',
|
|
15568
|
+
template: "<ng-container *ngIf=\"showDrawButton\">\n <button nz-button (click)=\"startDraw('polygon')\">\u7ED8\u5236\u591A\u8FB9\u5F62</button>\n <button nz-button (click)=\"startDraw('circle')\">\u7ED8\u5236\u5706\u5F62</button>\n <button nz-button (click)=\"stopDraw()\">\u7ED3\u675F\u7ED8\u5236</button>\n</ng-container>\n\n<!-- <input type=\"text\" placeholder=\"\u8BF7\u8F93\u5165\u5730\u70B9\" [(ngModel)]=\"searchText\" />\n<button nz-button (click)=\"search()\">\u67E5\u8BE2</button> -->\n",
|
|
15569
|
+
styles: [":host{position:absolute;display:block;left:0;top:0;z-index:100;padding:12px}button{transition:none}"]
|
|
15570
|
+
},] }
|
|
15571
|
+
];
|
|
15572
|
+
__decorate([
|
|
15573
|
+
Property('线条宽度', {
|
|
15574
|
+
ui: { widget: 'myRange', min: 1, max: 40, step: 1 },
|
|
15575
|
+
}),
|
|
15576
|
+
__metadata("design:type", Object)
|
|
15577
|
+
], BaiduFenceComponent.prototype, "lineWidth", void 0);
|
|
15578
|
+
__decorate([
|
|
15579
|
+
Property('线条颜色', {
|
|
15580
|
+
type: 'string',
|
|
15581
|
+
ui: {
|
|
15582
|
+
widget: 'myColor',
|
|
15583
|
+
},
|
|
15584
|
+
}),
|
|
15585
|
+
__metadata("design:type", Object)
|
|
15586
|
+
], BaiduFenceComponent.prototype, "lineColor", void 0);
|
|
15587
|
+
__decorate([
|
|
15588
|
+
Property('填充颜色', {
|
|
15589
|
+
type: 'string',
|
|
15590
|
+
ui: {
|
|
15591
|
+
widget: 'myColor',
|
|
15592
|
+
},
|
|
15593
|
+
}),
|
|
15594
|
+
__metadata("design:type", Object)
|
|
15595
|
+
], BaiduFenceComponent.prototype, "fillColor", void 0);
|
|
15596
|
+
__decorate([
|
|
15597
|
+
Property('显示绘制按钮', { type: 'boolean' }),
|
|
15598
|
+
__metadata("design:type", Object)
|
|
15599
|
+
], BaiduFenceComponent.prototype, "showDrawButton", void 0);
|
|
15600
|
+
__decorate([
|
|
15601
|
+
Data({
|
|
15602
|
+
properties: {
|
|
15603
|
+
id: ɵ0$c,
|
|
15604
|
+
// name: { type: 'string', title: '围栏名称' },
|
|
15605
|
+
type: { type: 'string', title: '围栏类型' },
|
|
15606
|
+
lnglat: { type: 'string', title: '经纬度' },
|
|
15607
|
+
radius: { type: 'number', title: '半径' },
|
|
15608
|
+
},
|
|
15609
|
+
}),
|
|
15610
|
+
__metadata("design:type", Array)
|
|
15611
|
+
], BaiduFenceComponent.prototype, "data", void 0);
|
|
15612
|
+
__decorate([
|
|
15613
|
+
Event('新增围栏', {
|
|
15614
|
+
params: {
|
|
15615
|
+
properties: {
|
|
15616
|
+
type: { type: 'string', title: '围栏类型' },
|
|
15617
|
+
lnglat: { type: 'string', title: '经纬度' },
|
|
15618
|
+
radius: { type: 'number', title: '半径' },
|
|
15619
|
+
},
|
|
15620
|
+
},
|
|
15621
|
+
}),
|
|
15622
|
+
__metadata("design:type", Object)
|
|
15623
|
+
], BaiduFenceComponent.prototype, "create", void 0);
|
|
15624
|
+
__decorate([
|
|
15625
|
+
Method('开始绘制'),
|
|
15626
|
+
__param(0, Param('类型', {
|
|
15627
|
+
type: 'string',
|
|
15628
|
+
enum: [
|
|
15629
|
+
{ label: '多边形', value: 'polygon' },
|
|
15630
|
+
{ label: '圆形', value: 'circle' },
|
|
15631
|
+
],
|
|
15632
|
+
})),
|
|
15633
|
+
__metadata("design:type", Function),
|
|
15634
|
+
__metadata("design:paramtypes", [String]),
|
|
15635
|
+
__metadata("design:returntype", Promise)
|
|
15636
|
+
], BaiduFenceComponent.prototype, "startDraw", null);
|
|
15637
|
+
__decorate([
|
|
15638
|
+
Method('结束绘制'),
|
|
15639
|
+
__metadata("design:type", Function),
|
|
15640
|
+
__metadata("design:paramtypes", []),
|
|
15641
|
+
__metadata("design:returntype", void 0)
|
|
15642
|
+
], BaiduFenceComponent.prototype, "stopDraw", null);
|
|
15643
|
+
BaiduFenceComponent = __decorate([
|
|
15644
|
+
Widget('电子围栏', {
|
|
15645
|
+
group: 'component',
|
|
15646
|
+
image: '',
|
|
15647
|
+
icon: '',
|
|
15648
|
+
hidden: true,
|
|
15649
|
+
})
|
|
15650
|
+
], BaiduFenceComponent);
|
|
15651
|
+
|
|
15252
15652
|
class CustomBaiduMapModule {
|
|
15253
15653
|
constructor(widgetService) {
|
|
15254
15654
|
widgetService.register(CustomBaiduMapComponent, { scaleContent: false });
|
|
@@ -15256,6 +15656,7 @@ class CustomBaiduMapModule {
|
|
|
15256
15656
|
widgetService.register(BaiduPolylineLayerComponent);
|
|
15257
15657
|
widgetService.register(WindLayerComponent);
|
|
15258
15658
|
widgetService.register(TyphoonAreaLayerComponent);
|
|
15659
|
+
widgetService.register(BaiduFenceComponent);
|
|
15259
15660
|
}
|
|
15260
15661
|
}
|
|
15261
15662
|
CustomBaiduMapModule.decorators = [
|
|
@@ -15266,6 +15667,7 @@ CustomBaiduMapModule.decorators = [
|
|
|
15266
15667
|
BaiduPolylineLayerComponent,
|
|
15267
15668
|
WindLayerComponent,
|
|
15268
15669
|
TyphoonAreaLayerComponent,
|
|
15670
|
+
BaiduFenceComponent,
|
|
15269
15671
|
],
|
|
15270
15672
|
imports: [
|
|
15271
15673
|
CommonModule,
|
|
@@ -15275,6 +15677,7 @@ CustomBaiduMapModule.decorators = [
|
|
|
15275
15677
|
ScrollingModule,
|
|
15276
15678
|
NzRadioModule,
|
|
15277
15679
|
FormsModule,
|
|
15680
|
+
NzButtonModule,
|
|
15278
15681
|
],
|
|
15279
15682
|
},] }
|
|
15280
15683
|
];
|
|
@@ -15919,7 +16322,7 @@ CrossTableModule.ctorParameters = () => [
|
|
|
15919
16322
|
{ type: WidgetService }
|
|
15920
16323
|
];
|
|
15921
16324
|
|
|
15922
|
-
const ɵ0$
|
|
16325
|
+
const ɵ0$d = { type: 'object', title: '行数据' };
|
|
15923
16326
|
let TableComponent = class TableComponent {
|
|
15924
16327
|
constructor(ele) {
|
|
15925
16328
|
this.ele = ele;
|
|
@@ -16559,7 +16962,7 @@ __decorate([
|
|
|
16559
16962
|
properties: {
|
|
16560
16963
|
index: { type: 'string', title: '列名' },
|
|
16561
16964
|
value: { type: 'string', title: '值' },
|
|
16562
|
-
data: ɵ0$
|
|
16965
|
+
data: ɵ0$d,
|
|
16563
16966
|
},
|
|
16564
16967
|
},
|
|
16565
16968
|
}),
|
|
@@ -19393,7 +19796,7 @@ function updateEndTime(event) {
|
|
|
19393
19796
|
}
|
|
19394
19797
|
}
|
|
19395
19798
|
|
|
19396
|
-
const ɵ0$
|
|
19799
|
+
const ɵ0$e = { type: 'string', title: 'id' };
|
|
19397
19800
|
let CalendarComponent = class CalendarComponent {
|
|
19398
19801
|
constructor(router, cd) {
|
|
19399
19802
|
this.router = router;
|
|
@@ -19521,7 +19924,7 @@ __decorate([
|
|
|
19521
19924
|
__decorate([
|
|
19522
19925
|
Data({
|
|
19523
19926
|
properties: {
|
|
19524
|
-
id: ɵ0$
|
|
19927
|
+
id: ɵ0$e,
|
|
19525
19928
|
start: { type: 'string', title: '开始日期' },
|
|
19526
19929
|
end: { type: 'string', title: '结束日期' },
|
|
19527
19930
|
title: { type: 'string', title: '内容' },
|
|
@@ -19579,7 +19982,7 @@ CalendarEventsChild.ctorParameters = () => [
|
|
|
19579
19982
|
{ type: CalendarComponent }
|
|
19580
19983
|
];
|
|
19581
19984
|
|
|
19582
|
-
const ɵ0$
|
|
19985
|
+
const ɵ0$f = { type: 'string', title: 'id' };
|
|
19583
19986
|
let BackgroundEventsComponent = class BackgroundEventsComponent extends CalendarEventsChild {
|
|
19584
19987
|
constructor(parent) {
|
|
19585
19988
|
super(parent);
|
|
@@ -19622,7 +20025,7 @@ __decorate([
|
|
|
19622
20025
|
__decorate([
|
|
19623
20026
|
Data({
|
|
19624
20027
|
properties: {
|
|
19625
|
-
id: ɵ0$
|
|
20028
|
+
id: ɵ0$f,
|
|
19626
20029
|
start: { type: 'string', title: '开始日期' },
|
|
19627
20030
|
end: { type: 'string', title: '结束日期' },
|
|
19628
20031
|
title: { type: 'string', title: '标题' },
|
|
@@ -19636,7 +20039,7 @@ BackgroundEventsComponent = __decorate([
|
|
|
19636
20039
|
__metadata("design:paramtypes", [CalendarComponent])
|
|
19637
20040
|
], BackgroundEventsComponent);
|
|
19638
20041
|
|
|
19639
|
-
const ɵ0$
|
|
20042
|
+
const ɵ0$g = { type: 'string', title: 'id' };
|
|
19640
20043
|
let EventsComponent = class EventsComponent extends CalendarEventsChild {
|
|
19641
20044
|
constructor(parent) {
|
|
19642
20045
|
super(parent);
|
|
@@ -19685,7 +20088,7 @@ __decorate([
|
|
|
19685
20088
|
__decorate([
|
|
19686
20089
|
Data({
|
|
19687
20090
|
properties: {
|
|
19688
|
-
id: ɵ0$
|
|
20091
|
+
id: ɵ0$g,
|
|
19689
20092
|
start: { type: 'string', title: '开始日期' },
|
|
19690
20093
|
end: { type: 'string', title: '结束日期' },
|
|
19691
20094
|
title: { type: 'string', title: '标题' },
|
|
@@ -20629,5 +21032,5 @@ WorkbenchWidgetModule.ctorParameters = () => [
|
|
|
20629
21032
|
* Generated bundle index. Do not edit.
|
|
20630
21033
|
*/
|
|
20631
21034
|
|
|
20632
|
-
export { AudioModule, BarChartThreeDModule, BasicBarChartComponent, BasicBarChartModule, BasicLineChartModule, BasicPieChartModule, BasicPlanimetricMapModule, BubbleChartModule, CheckboxModule, CommonService, CrossTableModule, CustomBaiduMapModule, DatePickerModule, FileUrlService, FunnelChartModule, GaodeMapService, GaugeModule, IframeModule, LiquidFillModule, MarqueeModule, PercentPieChartModule, PlanimetricMap2dModule, PlanimetricMap3dModule, RadarChartModule, Scatter3dModule, ScreenWidgetModule, SelectModule, TableModule, TreeControlModule, TreeRingChartModule, VideoGridModule, VideoPlayerModule, VisualMapChartModule, WorkbenchWidgetModule, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2$2 as ɵ2, ɵ3$2 as ɵ3, ImageModule as ɵa, ImageComponent as ɵb, WeatherModule as ɵba, WeatherComponent as ɵbb, RadioModule as ɵbc, RadioComponent as ɵbd, CheckboxComponent as ɵbe, RateModule as ɵbf, RateComponent as ɵbg, GeneralTextModule as ɵbh, GeneralTextComponent as ɵbi, MarqueeComponent as ɵbj, WordartModule as ɵbk, WordartComponent as ɵbl, IconfontModule as ɵbm, IconfontComponent as ɵbn, TableComponent as ɵbo, AudioComponent as ɵbp, VideoPlayerComponent as ɵbq, ShapeModule as ɵbr, ShapeComponent as ɵbs, BackgroundModule as ɵbt, BackgroundComponent as ɵbu, ShufflingListModule as ɵbv, ShufflingListComponent as ɵbw, ColorPipe as ɵbx, BasicPlanimetricMapComponent as ɵby, ParentContainerComponent as ɵbz, BasicLineChartComponent as ɵc, BreathingBubbleLayerModule as ɵca, BreathingBubbleLayerComponent as ɵcb, PlanimetricMap2dComponent as ɵcc, FlyLineLayerModule as ɵcd, FlyLineLayerComponent as ɵce, Map2dPolylineLayerModule as ɵcf, Map2dPolylineLayerComponent as ɵcg, Map2dMarkLayerModule as ɵch, Map2dMarkLayerComponent as ɵci, Map2dVisualLayerModule as ɵcj, Map2dVisualLayerComponent as ɵck, ParentContainerModule as ɵcl, PlanimetricMap3dComponent as ɵcm, Map3dMarkLayerModule as ɵcn, Map3dMarkLayerComponent as ɵco, Map3dLineLayerModule as ɵcp, Map3dLineLayerComponent as ɵcq, MipAnimModule as ɵcr, MipAnimComponent as ɵcs, TreeControlComponent as ɵct, VisualMapChartComponent as ɵcu, DatePickerComponent as ɵcv, TimePickerModule as ɵcw, TimePickerComponent as ɵcx, CustomBaiduMapComponent as ɵcy, BaiduMarkerLayerComponent as ɵcz, BasicPieChartComponent as ɵd, BaseLayer as ɵda, BaiduPolylineLayerComponent as ɵdb, WindLayerComponent as ɵdc, TyphoonAreaLayerComponent as ɵdd,
|
|
21035
|
+
export { AudioModule, BarChartThreeDModule, BasicBarChartComponent, BasicBarChartModule, BasicLineChartModule, BasicPieChartModule, BasicPlanimetricMapModule, BubbleChartModule, CheckboxModule, CommonService, CrossTableModule, CustomBaiduMapModule, DatePickerModule, FileUrlService, FunnelChartModule, GaodeMapService, GaugeModule, IframeModule, LiquidFillModule, MarqueeModule, PercentPieChartModule, PlanimetricMap2dModule, PlanimetricMap3dModule, RadarChartModule, Scatter3dModule, ScreenWidgetModule, SelectModule, TableModule, TreeControlModule, TreeRingChartModule, VideoGridModule, VideoPlayerModule, VisualMapChartModule, WorkbenchWidgetModule, ɵ0$2 as ɵ0, ɵ1$2 as ɵ1, ɵ2$2 as ɵ2, ɵ3$2 as ɵ3, ImageModule as ɵa, ImageComponent as ɵb, WeatherModule as ɵba, WeatherComponent as ɵbb, RadioModule as ɵbc, RadioComponent as ɵbd, CheckboxComponent as ɵbe, RateModule as ɵbf, RateComponent as ɵbg, GeneralTextModule as ɵbh, GeneralTextComponent as ɵbi, MarqueeComponent as ɵbj, WordartModule as ɵbk, WordartComponent as ɵbl, IconfontModule as ɵbm, IconfontComponent as ɵbn, TableComponent as ɵbo, AudioComponent as ɵbp, VideoPlayerComponent as ɵbq, ShapeModule as ɵbr, ShapeComponent as ɵbs, BackgroundModule as ɵbt, BackgroundComponent as ɵbu, ShufflingListModule as ɵbv, ShufflingListComponent as ɵbw, ColorPipe as ɵbx, BasicPlanimetricMapComponent as ɵby, ParentContainerComponent as ɵbz, BasicLineChartComponent as ɵc, BreathingBubbleLayerModule as ɵca, BreathingBubbleLayerComponent as ɵcb, PlanimetricMap2dComponent as ɵcc, FlyLineLayerModule as ɵcd, FlyLineLayerComponent as ɵce, Map2dPolylineLayerModule as ɵcf, Map2dPolylineLayerComponent as ɵcg, Map2dMarkLayerModule as ɵch, Map2dMarkLayerComponent as ɵci, Map2dVisualLayerModule as ɵcj, Map2dVisualLayerComponent as ɵck, ParentContainerModule as ɵcl, PlanimetricMap3dComponent as ɵcm, Map3dMarkLayerModule as ɵcn, Map3dMarkLayerComponent as ɵco, Map3dLineLayerModule as ɵcp, Map3dLineLayerComponent as ɵcq, MipAnimModule as ɵcr, MipAnimComponent as ɵcs, TreeControlComponent as ɵct, VisualMapChartComponent as ɵcu, DatePickerComponent as ɵcv, TimePickerModule as ɵcw, TimePickerComponent as ɵcx, CustomBaiduMapComponent as ɵcy, BaiduMarkerLayerComponent as ɵcz, BasicPieChartComponent as ɵd, BaseLayer as ɵda, BaiduPolylineLayerComponent as ɵdb, WindLayerComponent as ɵdc, TyphoonAreaLayerComponent as ɵdd, BaiduFenceComponent as ɵde, UploadModule as ɵdf, UploadComponent as ɵdg, CrossTableComponent as ɵdh, Pie3dChartModule as ɵdi, Pie3dChartComponent as ɵdj, HighChartsService as ɵdk, MultiTitleGaugeModule as ɵdl, MultiTitleGaugeComponent as ɵdm, GaugeProgressModule as ɵdn, GaugeProgressComponent as ɵdo, ItemSwiperModule as ɵdp, ItemSwiperComponent as ɵdq, BulletinBoardModule as ɵdr, BulletinBoardComponent as ɵds, TemporaryDataModule as ɵdt, TemporaryDataComponent as ɵdu, LineLightFlowModule as ɵdv, LineLightFlowComponent as ɵdw, IframeComponent as ɵdx, VideoGridComponent as ɵdy, Scatter3dComponent as ɵdz, LineBarChartModule as ɵe, AnnouncementModule as ɵea, AnnouncementComponent as ɵeb, TabsModule as ɵec, TabsComponent as ɵed, TabComponent as ɵee, CalendarModule as ɵef, CalendarComponent as ɵeg, BackgroundEventsComponent as ɵeh, CalendarEventsChild as ɵei, EventsComponent as ɵej, GanttModule as ɵek, GanttComponent as ɵel, LineBarChartComponent as ɵf, BarChartThreeDComponent as ɵg, BubbleChartComponent as ɵh, RadarChartComponent as ɵi, FunnelChartComponent as ɵj, PercentPieChartComponent as ɵk, TreeRingChartComponent as ɵl, GaugeComponent as ɵm, LiquidFillComponent as ɵn, ButtonModule as ɵo, ButtonComponent as ɵp, HttpService as ɵq, TimerModule as ɵr, TimerComponent as ɵs, NumberFlopModule as ɵt, NumberFlopComponent as ɵu, VoteModule as ɵv, VoteComponent as ɵw, SelectComponent as ɵx, SearchModule as ɵy, SearchComponent as ɵz };
|
|
20633
21036
|
//# sourceMappingURL=bbj-screen-widget.js.map
|