@kq_npm/client3d_webgl_vue 4.5.43 → 4.5.44

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/index.js CHANGED
@@ -1271,7 +1271,7 @@ __webpack_require__.d(__webpack_exports__, {
1271
1271
  Kq3dWireframeSketch: function() { return /* reexport */ wireframesketch_WireframeSketch; },
1272
1272
  Kq3dWireframeSketchViewModel: function() { return /* reexport */ WireframeSketchViewModel; },
1273
1273
  KqSceneApp: function() { return /* reexport */ SceneApp; },
1274
- KqSceneView: function() { return /* reexport */ SceneView; },
1274
+ KqSceneView: function() { return /* reexport */ sceneview_SceneView; },
1275
1275
  KqSceneViewViewModel: function() { return /* reexport */ SceneViewViewModel; },
1276
1276
  "default": function() { return /* binding */ webgl; },
1277
1277
  webglComponents: function() { return /* reexport */ webglComponents; }
@@ -1333,7 +1333,7 @@ class DrawManager {
1333
1333
  //折线样式
1334
1334
  polyline: {
1335
1335
  width: 2, //线宽
1336
- color: "#ff0000", //线颜色
1336
+ color: "#3388ff", //线颜色
1337
1337
  opacity: 1, //线颜色透明度
1338
1338
  arcType: 1,
1339
1339
  clampToGround: true //是否贴地
@@ -1341,10 +1341,10 @@ class DrawManager {
1341
1341
  //多边形样式
1342
1342
  polygon: {
1343
1343
  fill: true, //是否填充颜色
1344
- fillColor: "#1E90FF", //填充颜色
1344
+ fillColor: "#3388ff", //填充颜色
1345
1345
  fillOpacity: 0.3, //填充颜色透明度
1346
1346
  width: 2, //边框宽度
1347
- color: "#ff0000", //边框颜色
1347
+ color: "#3388ff", //边框颜色
1348
1348
  opacity: 1, //边框颜色透明度
1349
1349
  clampToGround: true //是否贴地
1350
1350
  }
@@ -1384,6 +1384,8 @@ class DrawManager {
1384
1384
  clampToGround: true //是否贴地
1385
1385
  }
1386
1386
  };
1387
+ // 绘制提示样式
1388
+ _drawTipsStyle = {};
1387
1389
 
1388
1390
  constructor(viewer, language) {
1389
1391
  this._viewer = viewer;
@@ -1426,6 +1428,65 @@ class DrawManager {
1426
1428
  this._drawStyle.freehandpolygon = this._drawStyle.polygon; //手绘面
1427
1429
  this._drawStyle.rectangle = this._drawStyle.polygon; //矩形
1428
1430
  }
1431
+ // 设置鼠标绘制提示显隐
1432
+ showDrawTipsStyle(val) {
1433
+ this._drawHandler.drawHandler.showDrawTips = val;
1434
+ val && this.setDrawTipsStyle()
1435
+ }
1436
+ // 设置绘制鼠标提示
1437
+ setDrawTipsStyle(params = {}) {
1438
+ if (!this._drawHandler?.drawHandler) return;
1439
+ const processedParams = Object.entries(params).reduce((acc, [key, value]) => {
1440
+ acc[key] = (value === '') ? null : value;
1441
+ return acc;
1442
+ }, {});
1443
+ this._drawHandler.drawHandler.drawTipsStyle = {
1444
+ ...(this._drawTipsStyle || {}),
1445
+ ...processedParams
1446
+ };
1447
+ }
1448
+ // 根据绘制类型设置绘制提示
1449
+ setDrawTipsStyleByType(type, groupName) {
1450
+ let drawTipsStyle = {
1451
+ beforeDrawText: this._language?.beforeDrawText,
1452
+ duringDrawText: this._language?.duringDrawText,
1453
+ }
1454
+ if (['rectangle', 'circle'].includes(type)) drawTipsStyle.duringDrawText = this._language?.measureSlopeBeforeDrawText ?? '';
1455
+ switch (groupName) {
1456
+ case "BoxClipDraw":
1457
+ case "PlaneClipDraw":
1458
+ drawTipsStyle.beforeDrawText = this._language?.boxClipBeforeDrawText ?? '';
1459
+ break;
1460
+ case "GPUSpatialQueryDraw":
1461
+ drawTipsStyle.beforeDrawText = this._language?.spatialQueryBeforeDrawText ?? '';
1462
+ break;
1463
+ case "parallelLightDraw":
1464
+ drawTipsStyle.beforeDrawText = this._language?.parallelLightBeforeDrawText ?? '';
1465
+ drawTipsStyle.duringDrawText = this._language?.parallelLightDuringDrawText ?? '';
1466
+ break;
1467
+ case "LightDraw":
1468
+ case "ParticleEffectDraw":
1469
+ case "RadarScanAnalysis":
1470
+ case "ScanEffectDraw":
1471
+ case "SceneAdvancedToImageDraw":
1472
+ case "SightlineAnalysisDraw":
1473
+ case "WeatherEffectDraw":
1474
+ case "SightlineAnalysisDraw":
1475
+ case "SightlineAnalysisDraw":
1476
+ drawTipsStyle.beforeDrawText = this._language?.lightBeforeDrawText ?? '';
1477
+ break;
1478
+ case "windySlicingPointDraw":
1479
+ drawTipsStyle.beforeDrawText = this._language?.modelPickBeforeDrawText ?? '';
1480
+ break;
1481
+ case "windySlicingLineDraw":
1482
+ case "ModelProfileAnalysis":
1483
+ drawTipsStyle.duringDrawText = this._language?.slicingDuringDrawText ?? '';
1484
+ break;
1485
+ default:
1486
+ break;
1487
+ }
1488
+ this.setDrawTipsStyle?.(drawTipsStyle);
1489
+ }
1429
1490
 
1430
1491
  // 获取三维填充样式
1431
1492
  getFillStyle(fillStyle) {
@@ -1541,7 +1602,6 @@ class DrawManager {
1541
1602
 
1542
1603
  //开始绘制
1543
1604
  startDraw(type, style, callback, groupName, isMulti = false) {
1544
-
1545
1605
  // 开始绘制之前停止编辑和关闭样式设置框
1546
1606
  if (this._drawHandler.editHandler.shapeObject) {
1547
1607
  this._drawHandler.startEdit(null);
@@ -1594,6 +1654,9 @@ class DrawManager {
1594
1654
  unionOptions.fillOpacity
1595
1655
  );
1596
1656
  }
1657
+ if (this._drawHandler?.drawHandler?.showDrawTips) {
1658
+ this.setDrawTipsStyleByType(type, groupName);
1659
+ }
1597
1660
  this._drawHandler.startDraw(type, type, unionOptions);
1598
1661
  var that = this;
1599
1662
  if (this.removeEventListener) this.removeEventListener();
@@ -1609,7 +1672,7 @@ class DrawManager {
1609
1672
  shape.options = options;
1610
1673
  if (callback) {
1611
1674
  var feature = that.shapeToGeoFeature(shape);
1612
- callback(feature.geometry, { layer: shape.guid, shape: shape });
1675
+ if (feature.geometry) callback(feature.geometry, { layer: shape.guid, shape: shape });
1613
1676
  }
1614
1677
  if (that.removeEventListener) that.removeEventListener();
1615
1678
  that.removeEventListener = null;
@@ -1681,10 +1744,7 @@ class DrawManager {
1681
1744
  var that = this;
1682
1745
  if (shape) {
1683
1746
  if (shape.controlPoints && shape.controlPoints.length === 0) return shape;
1684
- if (
1685
- shape.type === that._drawHandler.ShapeTypes.MARKER.type ||
1686
- shape.type === that._drawHandler.ShapeTypes.TEXT.type
1687
- ) {
1747
+ if (shape.type === that._drawHandler.ShapeTypes.MARKER.type || shape.type === that._drawHandler.ShapeTypes.TEXT.type) {
1688
1748
  let position = that.transformPosition(shape._position);
1689
1749
  geoFeature = window.turf.point(position);
1690
1750
  } else if (shape.type === that._drawHandler.ShapeTypes.CIRCLE.type) {
@@ -1729,7 +1789,9 @@ class DrawManager {
1729
1789
  positions[0].push(posi);
1730
1790
  }
1731
1791
  });
1732
- geoFeature = window.turf.polygon(positions);
1792
+ if (positions?.[0]?.length > 3) {
1793
+ geoFeature = window.turf.polygon(positions);
1794
+ }
1733
1795
  } else if (shape.type === that._drawHandler.ShapeTypes.CATMULLROMSPLINE.type) {
1734
1796
  let position = [[]];
1735
1797
  let positions = shape._positionsArray ? shape._positionsArray[0] : shape.controlPoints;
@@ -1743,7 +1805,7 @@ class DrawManager {
1743
1805
  }
1744
1806
 
1745
1807
  //通过geojson进行绘制,支持定位和闪烁
1746
- drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing = false) {
1808
+ drawFromGeojson(geojsonData, idCustom = "result", callFun, geojsonStyle, isLocation, flashing = false) {
1747
1809
  if (!geojsonStyle) geojsonStyle = {};
1748
1810
  let style = JSON.parse(JSON.stringify(this._geojsonStyle));
1749
1811
  for (var type in geojsonStyle) {
@@ -1755,7 +1817,7 @@ class DrawManager {
1755
1817
  style[type] = geojsonStyle[type];
1756
1818
  }
1757
1819
  }
1758
-
1820
+
1759
1821
  for (var type in style) {
1760
1822
  if (style[type].hasOwnProperty("color")) {
1761
1823
  if (!style[type].material)
@@ -2183,7 +2245,7 @@ class DrawManager {
2183
2245
  return layerList;
2184
2246
  }
2185
2247
 
2186
- createShapeFromFeature(feature, callFun, style, isLocation) {
2248
+ createShapeFromFeature(feature, groupName, callFun, style, isLocation) {
2187
2249
  let type = feature.geometry.type;
2188
2250
  let shape = null,
2189
2251
  coordinate = null;
@@ -2231,8 +2293,7 @@ class DrawManager {
2231
2293
  width: style.weight,
2232
2294
  fillColor: Cesium.Color.fromCssColorString(style.fillColor).withAlpha(style.fillOpacity),
2233
2295
  fill: true,
2234
- clampToGround: true,
2235
- material: this.getFillStyle(style.fillStyle)
2296
+ clampToGround: true
2236
2297
  });
2237
2298
  break;
2238
2299
  default:
@@ -2240,6 +2301,7 @@ class DrawManager {
2240
2301
  }
2241
2302
 
2242
2303
  if (shape) {
2304
+ shape.groupName = groupName;
2243
2305
  this._drawLayer.add(shape);
2244
2306
  if (callFun) callFun(shape.guid);
2245
2307
  if (isLocation) {
@@ -2443,8 +2505,8 @@ class DrawManager {
2443
2505
  }
2444
2506
  }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
2445
2507
  this._handler.setInputAction(function (movement) {
2446
- if(that.geocodeHighlight) {
2447
- if(that.geocodeHighlight.properties.id._value.id === that._selectedSvgId) {
2508
+ if (that.geocodeHighlight) {
2509
+ if (that.geocodeHighlight.properties.id._value.id === that._selectedSvgId) {
2448
2510
  that.geocodeHighlight = null;
2449
2511
  return;
2450
2512
  }
@@ -2453,7 +2515,7 @@ class DrawManager {
2453
2515
  }
2454
2516
  const pickedObject = scene.pick(movement.endPosition);
2455
2517
  if (Cesium.defined(pickedObject) && pickedObject.id && pickedObject.id instanceof Cesium.Entity && pickedObject.id.group == 'poisearch') {
2456
- if(pickedObject.id.properties.id._value.id === that._selectedSvgId) return;
2518
+ if (pickedObject.id.properties.id._value.id === that._selectedSvgId) return;
2457
2519
  pickedObject.id.billboard.image = pickedObject.id.properties.image1;
2458
2520
  that.geocodeHighlight = pickedObject.id;
2459
2521
  }
@@ -2482,9 +2544,9 @@ class DrawManager {
2482
2544
  },
2483
2545
  properties: data
2484
2546
  }
2485
- if(idCustom == 'center') {
2547
+ if (idCustom == 'center') {
2486
2548
  let radius = data.id.componentProps.radius;
2487
- if(radius) {
2549
+ if (radius) {
2488
2550
  entityOptions.ellipse = {
2489
2551
  semiMajorAxis: radius,
2490
2552
  semiMinorAxis: radius,
@@ -2502,7 +2564,7 @@ class DrawManager {
2502
2564
  if (pointDs.length > 0) {
2503
2565
  pointDs = pointDs[0];
2504
2566
  let entity = pointDs.entities.values[index];
2505
- if(style.fill === "#FF0000") {
2567
+ if (style.fill === "#FF0000") {
2506
2568
  entity.billboard.image = entity.properties.image1;
2507
2569
  } else {
2508
2570
  entity.billboard.image = entity.properties.image;
@@ -2547,17 +2609,17 @@ class DrawManager {
2547
2609
  this.createPointPoup(entity);
2548
2610
  }
2549
2611
  }
2550
-
2612
+
2551
2613
  // 添加点图标点击事件
2552
2614
  bindEvent2SvgIcon(eventType, eventFun) {
2553
- if(eventType == 'click') {
2615
+ if (eventType == 'click') {
2554
2616
  this._svgClickEvent = eventFun;
2555
2617
  }
2556
2618
  }
2557
2619
 
2558
2620
  // 移除点图标点击事件
2559
2621
  offEvent2SvgIcon(eventType) {
2560
- if(eventType == 'click') {
2622
+ if (eventType == 'click') {
2561
2623
  this._svgClickEvent = null;
2562
2624
  }
2563
2625
  }
@@ -2581,19 +2643,19 @@ class DrawManager {
2581
2643
  // 定位到图层
2582
2644
  locationByIdCustom(ids) {
2583
2645
  let idCustom = 'poisearch';
2584
- if(ids.length == 1 && (ids[0] == 'geocode' || ids[0] == 'geodecode')) idCustom = ids[0];
2646
+ if (ids.length == 1 && (ids[0] == 'geocode' || ids[0] == 'geodecode')) idCustom = ids[0];
2585
2647
  let pointDs = this._viewer.dataSources.getByName(idCustom);
2586
2648
  if (pointDs.length > 0) {
2587
- if(ids.length == 1) {
2649
+ if (ids.length == 1) {
2588
2650
  let entity = pointDs[0].entities.values[0];
2589
- if(idCustom == 'poisearch') entity = pointDs[0].entities.values[ids[0]];
2651
+ if (idCustom == 'poisearch') entity = pointDs[0].entities.values[ids[0]];
2590
2652
  let lonlat = this.transformPosition(entity.position._value);
2591
2653
  let height = this._viewer.camera.positionCartographic.height;
2592
2654
  this._viewer.camera.setView({
2593
2655
  destination: Cesium.Cartesian3.fromDegrees(lonlat[0], lonlat[1], height)
2594
2656
  });
2595
2657
  }
2596
- else if(ids.length > 1) {
2658
+ else if (ids.length > 1) {
2597
2659
  let offset = new Cesium.HeadingPitchRange(0, Cesium.Math.toRadians(-90), 0);
2598
2660
  this._viewer.flyTo(pointDs[0], { duration: 1.5, offset });
2599
2661
  }
@@ -2617,7 +2679,7 @@ class DrawManager {
2617
2679
  /********** 网络分析通用组件使用 start ************/
2618
2680
  // 绘制OD线
2619
2681
  drawAntPath(data, idCustom, drawStyle) {
2620
- if(data && data.geometry) {
2682
+ if (data && data.geometry) {
2621
2683
  let pathDs = this._viewer.dataSources.getByName(idCustom);
2622
2684
  if (pathDs.length === 0) {
2623
2685
  pathDs = new Cesium.CustomDataSource(idCustom);
@@ -2647,18 +2709,18 @@ class DrawManager {
2647
2709
  pathDs = pathDs[0];
2648
2710
  }
2649
2711
 
2650
- let duration = motionOptions.duration/1000;
2712
+ let duration = motionOptions.duration / 1000;
2651
2713
  var start = this._viewer.clock.currentTime;
2652
2714
  var stop = Cesium.JulianDate.addSeconds(start, duration, new Cesium.JulianDate());
2653
-
2715
+
2654
2716
  var sampledPosition = new Cesium.SampledPositionProperty();
2655
2717
  for (let i = 0; i <= coordinates.length - 1; i++) {
2656
- var item = coordinates[i];
2657
- var time = Cesium.JulianDate.addSeconds(start, duration * i / (coordinates.length - 1), new Cesium.JulianDate());
2658
- sampledPosition.addSample(time, Cesium.Cartesian3.fromDegrees(item[0], item[1], 1));
2718
+ var item = coordinates[i];
2719
+ var time = Cesium.JulianDate.addSeconds(start, duration * i / (coordinates.length - 1), new Cesium.JulianDate());
2720
+ sampledPosition.addSample(time, Cesium.Cartesian3.fromDegrees(item[0], item[1], 1));
2659
2721
  }
2660
2722
  sampledPosition.setInterpolationOptions({
2661
- interpolationAlgorithm: Cesium.LinearApproximation
2723
+ interpolationAlgorithm: Cesium.LinearApproximation
2662
2724
  });
2663
2725
 
2664
2726
  pathDs.entities.add({
@@ -3746,6 +3808,23 @@ class LayerManager {
3746
3808
  layer.guid = layerData.guid;
3747
3809
  }
3748
3810
  break;
3811
+ case "i3s":
3812
+ layerData.visible = isAdd;
3813
+ layerData.serverType = "3dtiles";
3814
+ if (isAdd) {
3815
+ layer = this._viewer.scene.primitives.add(new Cesium.I3SDataProvider({
3816
+ name: name,
3817
+ url: url,
3818
+ traceFetches: false,
3819
+ cesium3dTilesetOptions: {
3820
+ skipLevelOfDetail: false,
3821
+ debugShowBoundingVolume: false,
3822
+ },
3823
+ ...params
3824
+ }));
3825
+ layer.guid = layerData.guid;
3826
+ }
3827
+ break;
3749
3828
  case "kqgis3dserver":
3750
3829
  var that = this;
3751
3830
  layerData.visible = isAdd;
@@ -3776,6 +3855,9 @@ class LayerManager {
3776
3855
  } else if (layer instanceof Cesium.Kq3dS3MTilesLayer) {
3777
3856
  serverType = "3dtiles";
3778
3857
  layer.show = isAdd;
3858
+ } else if (Cesium.I3SDataProvider && layer instanceof Cesium.I3SDataProvider) {
3859
+ serverType = "3dtiles";
3860
+ layer.show = isAdd;
3779
3861
  }
3780
3862
  layer._guid = layerData.guid;
3781
3863
  layerData.serverType = serverType;
@@ -4431,7 +4513,7 @@ class LayerManager {
4431
4513
  layer = this._terrainProviders.find(item => {
4432
4514
  return item.guid === guid;
4433
4515
  });
4434
- } else if (type === "3dtiles" || type === "s3m") {
4516
+ } else if (type === "3dtiles") {
4435
4517
  let primitives = this._viewer.scene.primitives._primitives;
4436
4518
  layer = primitives.find(item => {
4437
4519
  return item.guid === guid;
@@ -4717,6 +4799,8 @@ class LayerManager {
4717
4799
  });
4718
4800
  }
4719
4801
  }
4802
+ } else if(Cesium.I3SDataProvider && layer instanceof Cesium.I3SDataProvider) { // i3s图层定位
4803
+ viewer.camera.flyTo({ destination: layer.extent });
4720
4804
  }
4721
4805
  }
4722
4806
  //获取底图图层Index
@@ -4955,7 +5039,6 @@ class LayerManager {
4955
5039
  this._viewer.terrainProvider = this._emptyTerrainProvider;
4956
5040
  break;
4957
5041
  case "3dtiles":
4958
- case "s3m":
4959
5042
  if (layer.textLabels) this._viewer.scene.primitives.remove(layer.textLabels);
4960
5043
  this._viewer.scene.primitives.remove(layer);
4961
5044
  break;
@@ -5291,6 +5374,19 @@ class SceneViewViewModel extends (mitt_default()) {
5291
5374
  _baseLayers = {}; //底图集合
5292
5375
  _onlineBaseLayerConfig = null;
5293
5376
  _currentBaseLayerConfig = null;
5377
+ _drawTipsStyle = {
5378
+ beforeDrawText: "",
5379
+ duringDrawText: "",
5380
+ font: "15px Arial",
5381
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
5382
+ fillColor: Cesium.Color.WHITE,
5383
+ outlineWidth: 2,
5384
+ outlineColor: Cesium.Color.BLACK,
5385
+ showBackground: false,
5386
+ backgroundColor: Cesium.Color.BLACK,
5387
+ scale: 1,
5388
+ pixelOffset: new Cesium.Cartesian2(10, 20),
5389
+ };
5294
5390
  constructor(props, lang) {
5295
5391
  super();
5296
5392
  this._viewerId = props.target;
@@ -5376,7 +5472,13 @@ class SceneViewViewModel extends (mitt_default()) {
5376
5472
  //初始化操作类
5377
5473
  initManagerClass() {
5378
5474
  if (this._viewer) {
5379
- if (this._props.isInitDrawManager) this._drawManager = new DrawManager(this._viewer, this._lang.language);
5475
+ if (this._props.isInitDrawManager) {
5476
+ this._drawManager = new DrawManager(this._viewer, this._lang.language);
5477
+ this._drawManager._drawTipsStyle = this._drawTipsStyle;
5478
+ if(this._props.showDrawTipsStyle) {
5479
+ this._drawManager.showDrawTipsStyle(this._props.showDrawTipsStyle);
5480
+ }
5481
+ }
5380
5482
  this._layerManager = new LayerManager(this);
5381
5483
  }
5382
5484
  }
@@ -5803,308 +5905,6 @@ class SceneViewViewModel extends (mitt_default()) {
5803
5905
  }
5804
5906
  }
5805
5907
 
5806
- ;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/sceneview/SceneView.vue?vue&type=script&setup=true&lang=js
5807
-
5808
-
5809
- const _hoisted_1 = {
5810
- class: "kq-scene-view",
5811
- ondragstart: "return false;",
5812
- oncontextmenu: "return false;"
5813
- }
5814
- const _hoisted_2 = ["id"]
5815
- const _hoisted_3 = { class: "reset-view" }
5816
- const _hoisted_4 = { class: "compass" }
5817
-
5818
- ;
5819
-
5820
-
5821
-
5822
-
5823
-
5824
- const __default__ = {
5825
- name: "KqSceneView"
5826
- };
5827
-
5828
- /* harmony default export */ var SceneViewvue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
5829
- props: {
5830
- target: {
5831
- type: String,
5832
- default: "cesiumContainer"
5833
- },
5834
- options: Object,
5835
- /**
5836
- * 图层数据源
5837
- * 事例:
5838
- * {
5839
- name: null,// 服务名称
5840
- url: null,//服务地址
5841
- token: null,//服务token
5842
- type: "kqmapserver", //服务类型 kqmapserver或者kq3dserver
5843
- isShowAllLayers: true,
5844
- defaultShowLayerNames: []
5845
- }
5846
- */
5847
- service: Object,
5848
- // SceneView初始化的参数对象,包含初始化范围和layer信息。
5849
- scenceInfo: Object,
5850
- // 默认显示的图层组名称
5851
- defaultShowLayerNames: Array,
5852
- // 是否初始化绘制类
5853
- isInitDrawManager: {
5854
- type: Boolean,
5855
- default: true
5856
- },
5857
- showToolButtons: {
5858
- type: Boolean,
5859
- default: true
5860
- },
5861
- /**
5862
- * 例:"top-left","top-right","bottom-left","bottom-right","left","right","bottom"
5863
- * {top:'16px',left:'16px'}, {top:16,left:16}
5864
- */
5865
- toolButtonsPosition: [String, Object],
5866
- showLogo: {
5867
- type: Boolean,
5868
- default: false
5869
- }
5870
- },
5871
- setup(__props, { expose: __expose }) {
5872
-
5873
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeMount)(() => {
5874
- if (!(0,util_.checkAuditTime)()) {
5875
- window.location.href = "./404.html";
5876
- }
5877
- });
5878
-
5879
- const { proxy } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
5880
- /**
5881
- * 支持传入属性:
5882
- * target - viewer对象渲染的div的id
5883
- * options - 三维球初始化属性设置
5884
- * showToolButtons - 是否显示工具栏按钮
5885
- */
5886
- const props = __props;
5887
-
5888
- let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
5889
- let viewModel = null;
5890
- let toolButtonsCss = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("top-left vertical");
5891
- let toolButtonsStyle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("");
5892
-
5893
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
5894
- if (props.toolButtonsPosition) {
5895
- if (typeof props.toolButtonsPosition === "string") {
5896
- let directionCss = "vertical";
5897
- if (props.toolButtonsPosition === "top" || props.toolButtonsPosition === "bottom") {
5898
- directionCss = "horizontal";
5899
- }
5900
- toolButtonsCss.value = props.toolButtonsPosition + " " + directionCss;
5901
- } else if (props.toolButtonsPosition instanceof Object) {
5902
- let styleString = "";
5903
- for (let key in props.toolButtonsPosition) {
5904
- styleString += key + ":" + props.toolButtonsPosition[key] + ";";
5905
- }
5906
- if (styleString) {
5907
- styleString += "position: absolute;z-index: 9999;";
5908
- toolButtonsCss.value = "vertical";
5909
- }
5910
- toolButtonsStyle.value = styleString;
5911
- }
5912
- }
5913
-
5914
- //设置语言
5915
- let _lang = proxy.$i18n.locale;
5916
- let _language = proxy.$i18n.messages[_lang]["webgl"];
5917
- language.value = _language;
5918
- let lang = {
5919
- type: _lang,
5920
- language: _language
5921
- };
5922
-
5923
- //初始化逻辑类
5924
- viewModel = new SceneViewViewModel(props, lang);
5925
- viewModel.initViewer();
5926
- });
5927
-
5928
- /**
5929
- * 获取SceneView的逻辑类
5930
- */
5931
- function getViewModel() {
5932
- return viewModel;
5933
- }
5934
-
5935
- // 销毁
5936
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
5937
- viewModel && viewModel.destroy();
5938
- });
5939
-
5940
- // 抛出方法 外部调用
5941
- __expose({
5942
- getViewModel
5943
- });
5944
-
5945
- return (_ctx, _cache) => {
5946
- return ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_1, [
5947
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "default"),
5948
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
5949
- id: props.target,
5950
- class: "view-container"
5951
- }, [
5952
- (props.showToolButtons)
5953
- ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", {
5954
- key: 0,
5955
- class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(toolButtonsCss)),
5956
- style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeStyle)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(toolButtonsStyle))
5957
- }, [
5958
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", null, [
5959
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(FixedZoomout), {
5960
- mapTarget: __props.target,
5961
- showShadow: true,
5962
- class: "zoomButton"
5963
- }, null, 8 /* PROPS */, ["mapTarget"])
5964
- ]),
5965
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", null, [
5966
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(FixedZoomin), {
5967
- mapTarget: __props.target,
5968
- showShadow: true,
5969
- class: "zoomButton"
5970
- }, null, 8 /* PROPS */, ["mapTarget"])
5971
- ]),
5972
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, [
5973
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(ResetView), {
5974
- mapTarget: __props.target,
5975
- showShadow: true
5976
- }, null, 8 /* PROPS */, ["mapTarget"])
5977
- ]),
5978
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_4, [
5979
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(Compass), {
5980
- mapTarget: __props.target,
5981
- showShadow: true
5982
- }, null, 8 /* PROPS */, ["mapTarget"])
5983
- ])
5984
- ], 6 /* CLASS, STYLE */))
5985
- : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)
5986
- ], 8 /* PROPS */, _hoisted_2)
5987
- ]))
5988
- }
5989
- }
5990
-
5991
- }));
5992
- ;// ./src/webgl/sceneview/SceneView.vue?vue&type=script&setup=true&lang=js
5993
-
5994
- ;// ./src/webgl/sceneview/SceneView.vue
5995
-
5996
-
5997
-
5998
- const __exports__ = SceneViewvue_type_script_setup_true_lang_js;
5999
-
6000
- /* harmony default export */ var SceneView = (__exports__);
6001
- ;// ./src/webgl/sceneview/index.js
6002
- /*
6003
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
6004
- * All rights reserved.
6005
- */
6006
-
6007
-
6008
-
6009
-
6010
- SceneView.install = (Vue, opts) => {
6011
- init_js_default()(Vue, opts);
6012
- Vue.component(SceneView.name, SceneView);
6013
- };
6014
-
6015
-
6016
-
6017
- ;// external "@element-plus/icons-vue"
6018
- var icons_vue_namespaceObject = require("@element-plus/icons-vue");
6019
- ;// ./src/webgl/fixedzoomout/FixedZoomoutViewModel.js
6020
- /*
6021
- * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
6022
- * All rights reserved.
6023
- */
6024
- // 三维固定缩放逻辑
6025
- class FixedZoomout3dViewModel {
6026
- _viewer = null; //三维viewer对象
6027
- constructor(viewer) {
6028
- this._viewer = viewer;
6029
- }
6030
- //获取相机焦点
6031
- getCameraFocus() {
6032
- if (!this._viewer) return;
6033
- var scene = this._viewer.scene;
6034
- var camera = scene.camera;
6035
- var rayScratch = new Cesium.Ray();
6036
- rayScratch.origin = camera.positionWC;
6037
- rayScratch.direction = camera.directionWC;
6038
- var result = new Cesium.Cartesian3();
6039
- result = scene.globe.pick(rayScratch, scene, result);
6040
- if (result) {
6041
- result = camera.worldToCameraCoordinatesPoint(result, result);
6042
- }
6043
- return result;
6044
- }
6045
- //地图放大
6046
- zoom(scale) {
6047
- if(this._viewer.scene.mode == Cesium.SceneMode.SCENE3D) {
6048
- this.zoom3D(scale);
6049
- } else if(this._viewer.scene.mode == Cesium.SceneMode.SCENE2D) {
6050
- this.zoom2D(scale);
6051
- }
6052
- }
6053
-
6054
- // 三维模式放大
6055
- zoom3D(scale) {
6056
- if (!this._viewer) return;
6057
- var scene = this._viewer.scene;
6058
- var camera = scene.camera;
6059
- var focus = this.getCameraFocus();
6060
- var orientation;
6061
- if (!focus) {
6062
- // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as
6063
- // the focal point.
6064
- var ray = new Cesium.Ray(
6065
- camera.worldToCameraCoordinatesPoint(
6066
- scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)
6067
- ),
6068
- camera.directionWC
6069
- );
6070
- focus = Cesium.IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
6071
-
6072
- orientation = {
6073
- heading: camera.heading,
6074
- pitch: camera.pitch,
6075
- roll: camera.roll
6076
- };
6077
- } else {
6078
- orientation = {
6079
- direction: camera.direction,
6080
- up: camera.up
6081
- };
6082
- }
6083
-
6084
- var cartesian3Scratch = new Cesium.Cartesian3();
6085
- var direction = Cesium.Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
6086
- var movementVector = Cesium.Cartesian3.multiplyByScalar(direction, scale, direction);
6087
- var endPosition = Cesium.Cartesian3.add(focus, movementVector, focus);
6088
- camera.flyTo({
6089
- destination: endPosition,
6090
- orientation: orientation,
6091
- duration: 0.5,
6092
- convert: false
6093
- });
6094
- }
6095
-
6096
- // 二维模式放大
6097
- zoom2D(scale) {
6098
- if (!this._viewer) return;
6099
- var scene = this._viewer.scene;
6100
- var camera = scene.camera;
6101
- let height = camera.positionCartographic.height;
6102
- camera.zoomIn(height * scale);
6103
- }
6104
- }
6105
-
6106
- // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
6107
- var gis_utils_ = __webpack_require__(64);
6108
5908
  ;// ./src/common/_lang/webgl/SceneView.js
6109
5909
  /*
6110
5910
  * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
@@ -6124,8 +5924,11 @@ let en = {
6124
5924
  clipAnalysis: '3D Clip Analysis',
6125
5925
  specialEffects: 'Special Effects',
6126
5926
  scene: 'Scene',
5927
+ beforeDrawText: 'Click left mouse button to start',
5928
+ duringDrawText: 'Click right mouse button to end',
6127
5929
  };
6128
5930
 
5931
+
6129
5932
  let zh = {
6130
5933
  zoomIn: "固定放大",
6131
5934
  zoomOut: "固定缩小",
@@ -6139,9 +5942,11 @@ let zh = {
6139
5942
  clipAnalysis: '三维裁剪分析',
6140
5943
  specialEffects: '特效',
6141
5944
  scene: '场景',
5945
+ beforeDrawText: '点击鼠标左键开始绘制',
5946
+ duringDrawText: '点击鼠标右键结束',
6142
5947
  };
6143
5948
 
6144
- /* harmony default export */ var webgl_SceneView = ({ en, zh });
5949
+ /* harmony default export */ var SceneView = ({ en, zh });
6145
5950
 
6146
5951
  ;// ./src/common/_lang/webgl/AddData.js
6147
5952
  /*
@@ -6362,7 +6167,8 @@ let BoxClip_en = {
6362
6167
  clipRotation: "Clip rotation(°)",
6363
6168
  clipPattern: "Clip pattern",
6364
6169
  insideClip: "Inside clip",
6365
- outsideClip: "Outside clip"
6170
+ outsideClip: "Outside clip",
6171
+ boxClipBeforeDrawText: 'Click the left button to pick up the position',
6366
6172
  };
6367
6173
 
6368
6174
  let BoxClip_zh = {
@@ -6381,7 +6187,8 @@ let BoxClip_zh = {
6381
6187
  clipRotation: "裁剪旋转角(°)",
6382
6188
  clipPattern: "裁剪方式",
6383
6189
  insideClip: "内部裁剪",
6384
- outsideClip: "外部裁剪"
6190
+ outsideClip: "外部裁剪",
6191
+ boxClipBeforeDrawText: '点击鼠标左键拾取位置',
6385
6192
  };
6386
6193
 
6387
6194
  /* harmony default export */ var BoxClip = ({ en: BoxClip_en, zh: BoxClip_zh });
@@ -6704,7 +6511,8 @@ let GPUSpatialQuery_en = {
6704
6511
  zoom: "Zoom",
6705
6512
  xRotate: "X rotate",
6706
6513
  yRotate: "Y rotate",
6707
- zRotate: "Z rotate"
6514
+ zRotate: "Z rotate",
6515
+ spatialQueryBeforeDrawText: "Click the left mouse button to start the query"
6708
6516
  };
6709
6517
 
6710
6518
  let GPUSpatialQuery_zh = {
@@ -6726,7 +6534,8 @@ let GPUSpatialQuery_zh = {
6726
6534
  zoom: "查询体缩放",
6727
6535
  xRotate: "绕X轴旋转",
6728
6536
  yRotate: "绕Y轴旋转",
6729
- zRotate: "绕Z轴旋转"
6537
+ zRotate: "绕Z轴旋转",
6538
+ spatialQueryBeforeDrawText: "点击鼠标左键绘制点"
6730
6539
  };
6731
6540
 
6732
6541
  /* harmony default export */ var GPUSpatialQuery = ({ en: GPUSpatialQuery_en, zh: GPUSpatialQuery_zh });
@@ -6830,6 +6639,11 @@ let Measure_en = {
6830
6639
  latitude: "Latitude",
6831
6640
  measuretAddTerrainTips: "Please load the terrain first!",
6832
6641
  measuretAddModelTips: "Please load the model first!",
6642
+ measureBeforeDrawText: 'Click the left button to start the measurement',
6643
+ measureDuringDrawText: 'Right-click to end the measurement',
6644
+ measureHeightDuringDrawText: 'Click the left button to end the measurement and the right button to cancel',
6645
+ measureCoordinateBeforeDrawText: 'Click the left button to measure and the right button to cancel',
6646
+ measureSlopeBeforeDrawText: 'Click the left or right button to end the measurement',
6833
6647
  };
6834
6648
 
6835
6649
  let Measure_zh = {
@@ -6863,6 +6677,11 @@ let Measure_zh = {
6863
6677
  latitude: "纬度",
6864
6678
  measuretAddTerrainTips: "请先加载地形!",
6865
6679
  measuretAddModelTips: "请先加载模型!",
6680
+ measureBeforeDrawText: '点击鼠标左键测量',
6681
+ measureDuringDrawText: '点击鼠标右键结束',
6682
+ measureHeightDuringDrawText: '点击鼠标左键结束,点击鼠标右键取消',
6683
+ measureCoordinateBeforeDrawText: '点击鼠标左键测量,点击鼠标右键取消',
6684
+ measureSlopeBeforeDrawText: '点击鼠标左键或右键结束',
6866
6685
  };
6867
6686
 
6868
6687
  /* harmony default export */ var Measure = ({ en: Measure_en, zh: Measure_zh });
@@ -6880,7 +6699,8 @@ let ModelSelect_en = {
6880
6699
  pick: "Pick",
6881
6700
  modelLayerName: "Layer name",
6882
6701
  notIdAttribute:"Feature has no attribute:",
6883
- noCesium3DTileFeature:"no Cesium3DTileFeature"
6702
+ noCesium3DTileFeature:"no Cesium3DTileFeature",
6703
+ modelPickBeforeDrawText: 'Click the left mouse button to pick',
6884
6704
  };
6885
6705
 
6886
6706
  let ModelSelect_zh = {
@@ -6890,7 +6710,8 @@ let ModelSelect_zh = {
6890
6710
  pick: "拾取",
6891
6711
  modelLayerName: "所属图层名称",
6892
6712
  notIdAttribute:"模型中没有属性:",
6893
- noCesium3DTileFeature:"不是Cesium3DTileFeature类型"
6713
+ noCesium3DTileFeature:"不是Cesium3DTileFeature类型",
6714
+ modelPickBeforeDrawText: '点击鼠标左键拾取',
6894
6715
  };
6895
6716
 
6896
6717
  /* harmony default export */ var ModelSelect = ({ en: ModelSelect_en, zh: ModelSelect_zh });
@@ -7044,7 +6865,7 @@ let ModelProfileAnalysis_en = {
7044
6865
  profileLength: "Profile Length",
7045
6866
  profileHeight: "Profile Height",
7046
6867
  totalLength: "Total Length",
7047
- totalHeight: "Total Height"
6868
+ totalHeight: "Total Height",
7048
6869
  };
7049
6870
 
7050
6871
  let ModelProfileAnalysis_zh = {
@@ -7058,7 +6879,7 @@ let ModelProfileAnalysis_zh = {
7058
6879
  profileLength: "剖面长度",
7059
6880
  profileHeight: "剖面高度",
7060
6881
  totalLength: "总长度",
7061
- totalHeight: "总高度"
6882
+ totalHeight: "总高度",
7062
6883
  };
7063
6884
 
7064
6885
  /* harmony default export */ var ModelProfileAnalysis = ({ en: ModelProfileAnalysis_en, zh: ModelProfileAnalysis_zh });
@@ -7552,6 +7373,7 @@ let Light_en = {
7552
7373
  decayFactor: "Decay factor",
7553
7374
  lightStrength: "Light strength",
7554
7375
  lightModel: "Light model",
7376
+ lightBeforeDrawText: "Click the left button to add a location point"
7555
7377
  };
7556
7378
 
7557
7379
  let Light_zh = {
@@ -7565,6 +7387,9 @@ let Light_zh = {
7565
7387
  decayFactor: "衰减因子",
7566
7388
  lightStrength: "光源强度",
7567
7389
  lightModel: "光源模型",
7390
+ lightBeforeDrawText: "点击左键添加位置点",
7391
+ parallelLightBeforeDrawText: "点击鼠标左键开始绘制",
7392
+ parallelLightDuringDrawText: "点击鼠标左键结束绘制",
7568
7393
  };
7569
7394
 
7570
7395
  /* harmony default export */ var Light = ({ en: Light_en, zh: Light_zh });
@@ -8045,7 +7870,8 @@ let WindySlicing_en = {
8045
7870
  renderList: "Render list",
8046
7871
  addRenderValue: "Add render value",
8047
7872
  deleteRow: "Delete row",
8048
- applicationBtn: "Application"
7873
+ applicationBtn: "Application",
7874
+ slicingDuringDrawText: 'Click left mouse button to end',
8049
7875
  };
8050
7876
 
8051
7877
  let WindySlicing_zh = {
@@ -8078,7 +7904,8 @@ let WindySlicing_zh = {
8078
7904
  renderList: "渲染列表",
8079
7905
  addRenderValue: "添加渲染值",
8080
7906
  deleteRow: "删除行",
8081
- applicationBtn: "应用"
7907
+ applicationBtn: "应用",
7908
+ slicingDuringDrawText: '点击鼠标左键结束',
8082
7909
  };
8083
7910
 
8084
7911
  /* harmony default export */ var WindySlicing = ({ en: WindySlicing_en, zh: WindySlicing_zh });
@@ -8163,7 +7990,7 @@ let webgl_en = {};
8163
7990
 
8164
7991
  Object.assign(
8165
7992
  webgl_en,
8166
- webgl_SceneView.en,
7993
+ SceneView.en,
8167
7994
  AddData.en,
8168
7995
  AspectAnalysis.en,
8169
7996
  BaseterrainGallery.en,
@@ -8214,7 +8041,7 @@ let webgl_zh = {};
8214
8041
 
8215
8042
  Object.assign(
8216
8043
  webgl_zh,
8217
- webgl_SceneView.zh,
8044
+ SceneView.zh,
8218
8045
  AddData.zh,
8219
8046
  AspectAnalysis.zh,
8220
8047
  BaseterrainGallery.zh,
@@ -8875,6 +8702,7 @@ let MapApp_zh = {
8875
8702
  */
8876
8703
  let VectorTileRender_en = {
8877
8704
  noDataMsg: "no data",
8705
+ switch: "switch mode",
8878
8706
  themeTitle: "Thematic Map Types",
8879
8707
  theme1: "basic",
8880
8708
  theme2: "heatmap",
@@ -8986,6 +8814,7 @@ let VectorTileRender_en = {
8986
8814
 
8987
8815
  let VectorTileRender_zh = {
8988
8816
  noDataMsg: "暂无数据",
8817
+ switch: "切换编辑模式",
8989
8818
  // 样式专题图
8990
8819
  themeTitle: "专题地图类型",
8991
8820
  theme1: "基本",
@@ -13722,7 +13551,7 @@ const provideGlobalConfig = (config, app, global = false) => {
13722
13551
  // 应用层 Provide 需要使用 app.provide
13723
13552
  const provideFn = app?.provide ?? (inSetup ? provide : undefined);
13724
13553
  if (!provideFn) {
13725
- debugWarn("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
13554
+ console.error("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
13726
13555
  return;
13727
13556
  }
13728
13557
 
@@ -13753,6 +13582,313 @@ const useLocale = localeOverrides => {
13753
13582
  return buildLocaleContext((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => (locale && locale.value) || _lang_zh));
13754
13583
  };
13755
13584
 
13585
+ ;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/sceneview/SceneView.vue?vue&type=script&setup=true&lang=js
13586
+
13587
+
13588
+ const _hoisted_1 = {
13589
+ class: "kq-scene-view",
13590
+ ondragstart: "return false;",
13591
+ oncontextmenu: "return false;"
13592
+ }
13593
+ const _hoisted_2 = ["id"]
13594
+ const _hoisted_3 = { class: "reset-view" }
13595
+ const _hoisted_4 = { class: "compass" }
13596
+
13597
+ ;
13598
+
13599
+
13600
+
13601
+
13602
+
13603
+
13604
+ const __default__ = {
13605
+ name: "KqSceneView"
13606
+ };
13607
+
13608
+ /* harmony default export */ var SceneViewvue_type_script_setup_true_lang_js = (/*@__PURE__*/Object.assign(__default__, {
13609
+ props: {
13610
+ target: {
13611
+ type: String,
13612
+ default: "cesiumContainer"
13613
+ },
13614
+ options: Object,
13615
+ /**
13616
+ * 图层数据源
13617
+ * 事例:
13618
+ * {
13619
+ name: null,// 服务名称
13620
+ url: null,//服务地址
13621
+ token: null,//服务token
13622
+ type: "kqmapserver", //服务类型 kqmapserver或者kq3dserver
13623
+ isShowAllLayers: true,
13624
+ defaultShowLayerNames: []
13625
+ }
13626
+ */
13627
+ service: Object,
13628
+ // SceneView初始化的参数对象,包含初始化范围和layer信息。
13629
+ scenceInfo: Object,
13630
+ // 默认显示的图层组名称
13631
+ defaultShowLayerNames: Array,
13632
+ // 是否初始化绘制类
13633
+ isInitDrawManager: {
13634
+ type: Boolean,
13635
+ default: true
13636
+ },
13637
+ // 是否显示绘制提示
13638
+ showDrawTipsStyle: {
13639
+ type: Boolean,
13640
+ default: false
13641
+ },
13642
+ showToolButtons: {
13643
+ type: Boolean,
13644
+ default: true
13645
+ },
13646
+ /**
13647
+ * 例:"top-left","top-right","bottom-left","bottom-right","left","right","bottom"
13648
+ * {top:'16px',left:'16px'}, {top:16,left:16}
13649
+ */
13650
+ toolButtonsPosition: [String, Object],
13651
+ showLogo: {
13652
+ type: Boolean,
13653
+ default: false
13654
+ }
13655
+ },
13656
+ setup(__props, { expose: __expose }) {
13657
+
13658
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeMount)(() => {
13659
+ if (!(0,util_.checkAuditTime)()) {
13660
+ window.location.href = "./404.html";
13661
+ }
13662
+ });
13663
+
13664
+ /**
13665
+ * 支持传入属性:
13666
+ * target - viewer对象渲染的div的id
13667
+ * options - 三维球初始化属性设置
13668
+ * showToolButtons - 是否显示工具栏按钮
13669
+ */
13670
+ const props = __props;
13671
+
13672
+ // 国际化
13673
+ const { lang, locale } = useLocale();
13674
+ let viewModel = null;
13675
+ let toolButtonsCss = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("top-left vertical");
13676
+ let toolButtonsStyle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("");
13677
+
13678
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
13679
+ if (props.toolButtonsPosition) {
13680
+ if (typeof props.toolButtonsPosition === "string") {
13681
+ let directionCss = "vertical";
13682
+ if (props.toolButtonsPosition === "top" || props.toolButtonsPosition === "bottom") {
13683
+ directionCss = "horizontal";
13684
+ }
13685
+ toolButtonsCss.value = props.toolButtonsPosition + " " + directionCss;
13686
+ } else if (props.toolButtonsPosition instanceof Object) {
13687
+ let styleString = "";
13688
+ for (let key in props.toolButtonsPosition) {
13689
+ styleString += key + ":" + props.toolButtonsPosition[key] + ";";
13690
+ }
13691
+ if (styleString) {
13692
+ styleString += "position: absolute;z-index: 9999;";
13693
+ toolButtonsCss.value = "vertical";
13694
+ }
13695
+ toolButtonsStyle.value = styleString;
13696
+ }
13697
+ }
13698
+
13699
+ //设置语言
13700
+ let _lang = lang.value;
13701
+ let _language = locale.value["webgl"];
13702
+ let language = {
13703
+ type: _lang,
13704
+ language: _language
13705
+ };
13706
+
13707
+ //初始化逻辑类
13708
+ viewModel = new SceneViewViewModel(props, language);
13709
+ viewModel.initViewer();
13710
+ });
13711
+
13712
+ /**
13713
+ * 获取SceneView的逻辑类
13714
+ */
13715
+ function getViewModel() {
13716
+ return viewModel;
13717
+ }
13718
+
13719
+ // 销毁
13720
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
13721
+ viewModel && viewModel.destroy();
13722
+ });
13723
+
13724
+ // 抛出方法 外部调用
13725
+ __expose({
13726
+ getViewModel
13727
+ });
13728
+
13729
+ return (_ctx, _cache) => {
13730
+ return ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_1, [
13731
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "default"),
13732
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", {
13733
+ id: props.target,
13734
+ class: "view-container"
13735
+ }, [
13736
+ (props.showToolButtons)
13737
+ ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", {
13738
+ key: 0,
13739
+ class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(toolButtonsCss)),
13740
+ style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeStyle)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(toolButtonsStyle))
13741
+ }, [
13742
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", null, [
13743
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(FixedZoomout), {
13744
+ mapTarget: __props.target,
13745
+ showShadow: true,
13746
+ class: "zoomButton"
13747
+ }, null, 8 /* PROPS */, ["mapTarget"])
13748
+ ]),
13749
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", null, [
13750
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(FixedZoomin), {
13751
+ mapTarget: __props.target,
13752
+ showShadow: true,
13753
+ class: "zoomButton"
13754
+ }, null, 8 /* PROPS */, ["mapTarget"])
13755
+ ]),
13756
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_3, [
13757
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(ResetView), {
13758
+ mapTarget: __props.target,
13759
+ showShadow: true
13760
+ }, null, 8 /* PROPS */, ["mapTarget"])
13761
+ ]),
13762
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_4, [
13763
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(Compass), {
13764
+ mapTarget: __props.target,
13765
+ showShadow: true
13766
+ }, null, 8 /* PROPS */, ["mapTarget"])
13767
+ ])
13768
+ ], 6 /* CLASS, STYLE */))
13769
+ : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)
13770
+ ], 8 /* PROPS */, _hoisted_2)
13771
+ ]))
13772
+ }
13773
+ }
13774
+
13775
+ }));
13776
+ ;// ./src/webgl/sceneview/SceneView.vue?vue&type=script&setup=true&lang=js
13777
+
13778
+ ;// ./src/webgl/sceneview/SceneView.vue
13779
+
13780
+
13781
+
13782
+ const __exports__ = SceneViewvue_type_script_setup_true_lang_js;
13783
+
13784
+ /* harmony default export */ var sceneview_SceneView = (__exports__);
13785
+ ;// ./src/webgl/sceneview/index.js
13786
+ /*
13787
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
13788
+ * All rights reserved.
13789
+ */
13790
+
13791
+
13792
+
13793
+
13794
+ sceneview_SceneView.install = (Vue, opts) => {
13795
+ init_js_default()(Vue, opts);
13796
+ Vue.component(sceneview_SceneView.name, sceneview_SceneView);
13797
+ };
13798
+
13799
+
13800
+
13801
+ ;// external "@element-plus/icons-vue"
13802
+ var icons_vue_namespaceObject = require("@element-plus/icons-vue");
13803
+ ;// ./src/webgl/fixedzoomout/FixedZoomoutViewModel.js
13804
+ /*
13805
+ * Copyright (C) 2019 KQ GEO Technologies Co., Ltd.
13806
+ * All rights reserved.
13807
+ */
13808
+ // 三维固定缩放逻辑
13809
+ class FixedZoomout3dViewModel {
13810
+ _viewer = null; //三维viewer对象
13811
+ constructor(viewer) {
13812
+ this._viewer = viewer;
13813
+ }
13814
+ //获取相机焦点
13815
+ getCameraFocus() {
13816
+ if (!this._viewer) return;
13817
+ var scene = this._viewer.scene;
13818
+ var camera = scene.camera;
13819
+ var rayScratch = new Cesium.Ray();
13820
+ rayScratch.origin = camera.positionWC;
13821
+ rayScratch.direction = camera.directionWC;
13822
+ var result = new Cesium.Cartesian3();
13823
+ result = scene.globe.pick(rayScratch, scene, result);
13824
+ if (result) {
13825
+ result = camera.worldToCameraCoordinatesPoint(result, result);
13826
+ }
13827
+ return result;
13828
+ }
13829
+ //地图放大
13830
+ zoom(scale) {
13831
+ if(this._viewer.scene.mode == Cesium.SceneMode.SCENE3D) {
13832
+ this.zoom3D(scale);
13833
+ } else if(this._viewer.scene.mode == Cesium.SceneMode.SCENE2D) {
13834
+ this.zoom2D(scale);
13835
+ }
13836
+ }
13837
+
13838
+ // 三维模式放大
13839
+ zoom3D(scale) {
13840
+ if (!this._viewer) return;
13841
+ var scene = this._viewer.scene;
13842
+ var camera = scene.camera;
13843
+ var focus = this.getCameraFocus();
13844
+ var orientation;
13845
+ if (!focus) {
13846
+ // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as
13847
+ // the focal point.
13848
+ var ray = new Cesium.Ray(
13849
+ camera.worldToCameraCoordinatesPoint(
13850
+ scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)
13851
+ ),
13852
+ camera.directionWC
13853
+ );
13854
+ focus = Cesium.IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
13855
+
13856
+ orientation = {
13857
+ heading: camera.heading,
13858
+ pitch: camera.pitch,
13859
+ roll: camera.roll
13860
+ };
13861
+ } else {
13862
+ orientation = {
13863
+ direction: camera.direction,
13864
+ up: camera.up
13865
+ };
13866
+ }
13867
+
13868
+ var cartesian3Scratch = new Cesium.Cartesian3();
13869
+ var direction = Cesium.Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
13870
+ var movementVector = Cesium.Cartesian3.multiplyByScalar(direction, scale, direction);
13871
+ var endPosition = Cesium.Cartesian3.add(focus, movementVector, focus);
13872
+ camera.flyTo({
13873
+ destination: endPosition,
13874
+ orientation: orientation,
13875
+ duration: 0.5,
13876
+ convert: false
13877
+ });
13878
+ }
13879
+
13880
+ // 二维模式放大
13881
+ zoom2D(scale) {
13882
+ if (!this._viewer) return;
13883
+ var scene = this._viewer.scene;
13884
+ var camera = scene.camera;
13885
+ let height = camera.positionCartographic.height;
13886
+ camera.zoomIn(height * scale);
13887
+ }
13888
+ }
13889
+
13890
+ // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
13891
+ var gis_utils_ = __webpack_require__(64);
13756
13892
  ;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/fixedzoomout/FixedZoomout.vue?vue&type=script&setup=true&lang=js
13757
13893
 
13758
13894
 
@@ -13784,7 +13920,6 @@ const FixedZoomoutvue_type_script_setup_true_lang_js_default_ = {
13784
13920
  setup(__props) {
13785
13921
 
13786
13922
  const props = __props;
13787
- const { proxy } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
13788
13923
 
13789
13924
  let viewModel = null;
13790
13925
  let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
@@ -13946,8 +14081,6 @@ class FixedZoomin3dViewModel {
13946
14081
  }
13947
14082
  }
13948
14083
 
13949
- ;// external "vue-i18n/dist/vue-i18n.cjs.js"
13950
- var vue_i18n_cjs_js_namespaceObject = require("vue-i18n/dist/vue-i18n.cjs.js");
13951
14084
  ;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/fixedzoomin/FixedZoomin.vue?vue&type=script&setup=true&lang=js
13952
14085
 
13953
14086
 
@@ -13979,18 +14112,11 @@ const FixedZoominvue_type_script_setup_true_lang_js_default_ = {
13979
14112
  setup(__props) {
13980
14113
 
13981
14114
  const props = __props;
13982
- const { proxy } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
13983
- let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
13984
14115
  let viewModel = null;
13985
14116
  let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
14117
+
13986
14118
  // 国际化
13987
- let { locale, messages } = (0,vue_i18n_cjs_js_namespaceObject.useI18n)();
13988
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(
13989
- () => locale.value,
13990
- (newVal, oldVal) => {
13991
- language.value = messages.value[newVal]["webgl"];
13992
- }
13993
- );
14119
+ const { t } = useLocale();
13994
14120
 
13995
14121
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
13996
14122
  gis_utils_.utils.getWebMap(props.mapTarget, scenceView => {
@@ -14010,7 +14136,7 @@ return (_ctx, _cache) => {
14010
14136
  const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.resolveComponent)("kq-button")
14011
14137
 
14012
14138
  return ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_button, {
14013
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).zoomOut,
14139
+ title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)('webgl.zoomOut'),
14014
14140
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)([{ 'kq-light-shadow': __props.showShadow }]),
14015
14141
  ref_key: "btn",
14016
14142
  ref: btn,
@@ -14074,6 +14200,8 @@ class ResetViewViewModel {
14074
14200
  }
14075
14201
  }
14076
14202
 
14203
+ ;// external "vue-i18n/dist/vue-i18n.cjs.js"
14204
+ var vue_i18n_cjs_js_namespaceObject = require("vue-i18n/dist/vue-i18n.cjs.js");
14077
14205
  ;// ./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/webgl/resetview/ResetView.vue?vue&type=script&setup=true&lang=js
14078
14206
 
14079
14207
 
@@ -14082,6 +14210,7 @@ class ResetViewViewModel {
14082
14210
 
14083
14211
 
14084
14212
 
14213
+
14085
14214
  // 获取组件传参
14086
14215
 
14087
14216
  const ResetViewvue_type_script_setup_true_lang_js_default_ = {
@@ -14105,18 +14234,11 @@ const ResetViewvue_type_script_setup_true_lang_js_default_ = {
14105
14234
  setup(__props) {
14106
14235
 
14107
14236
  const props = __props;
14108
- const { proxy } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
14109
- let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
14237
+
14110
14238
  let viewModel = null;
14111
14239
  let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
14112
14240
  // 国际化
14113
- let { locale, messages } = (0,vue_i18n_cjs_js_namespaceObject.useI18n)();
14114
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(
14115
- () => locale.value,
14116
- (newVal, oldVal) => {
14117
- language.value = messages.value[newVal]["webgl"];
14118
- }
14119
- );
14241
+ const { t } = useLocale();
14120
14242
 
14121
14243
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
14122
14244
  gis_utils_.utils.getWebMap(props.mapTarget, scenceView => {
@@ -14140,7 +14262,7 @@ return (_ctx, _cache) => {
14140
14262
  ref: btn,
14141
14263
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)([{ 'kq-light-shadow': __props.showShadow }]),
14142
14264
  onClick: btnClick,
14143
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).resetView,
14265
+ title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)('webgl.resetView'),
14144
14266
  style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeStyle)('width:'+__props.size+'px;height:'+__props.size+'px;')
14145
14267
  }, {
14146
14268
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
@@ -14273,18 +14395,11 @@ const Compassvue_type_script_setup_true_lang_js_default_ = {
14273
14395
  setup(__props) {
14274
14396
 
14275
14397
  const props = __props;
14276
- const { proxy } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.getCurrentInstance)();
14277
- let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(proxy.$i18n.global.messages[proxy.$i18n.global.locale]["webgl"]);
14398
+
14278
14399
  let viewModel = null;
14279
14400
  let heading = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
14280
14401
  // 国际化
14281
- let { locale, messages } = (0,vue_i18n_cjs_js_namespaceObject.useI18n)();
14282
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.watch)(
14283
- () => locale.value,
14284
- (newVal, oldVal) => {
14285
- language.value = messages.value[newVal]["webgl"];
14286
- }
14287
- );
14402
+ const { t } = useLocale();
14288
14403
 
14289
14404
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onMounted)(() => {
14290
14405
  gis_utils_.utils.getWebMap(props.mapTarget, scenceView => {
@@ -14311,7 +14426,7 @@ return (_ctx, _cache) => {
14311
14426
  return ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_button, {
14312
14427
  onClick: btnClick,
14313
14428
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)([{ 'kq-light-shadow': __props.showShadow }]),
14314
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).resetOrientation,
14429
+ title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(t)('webgl.resetOrientation'),
14315
14430
  style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeStyle)('clip-path: circle(50%);width:' + __props.size + 'px;height:' + __props.size + 'px;')
14316
14431
  }, {
14317
14432
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [
@@ -14981,21 +15096,20 @@ let scenceView_print = null;
14981
15096
  maxHeight.value = props.boxScrollHeight;
14982
15097
  }
14983
15098
  basemapShow.value = props.ShowBasemap;
14984
- if (!props.useCustomData) {
14985
- global_event_default().getWebMapByMapTarget(props.mapTarget, scenceView => {
14986
- if (scenceView && scenceView._viewer) {
14987
- scenceView_partent = scenceView;
14988
- viewModel._scenceView_partent = scenceView;
15099
+ global_event_default().getWebMapByMapTarget(props.mapTarget, scenceView => {
15100
+ if (scenceView && scenceView._viewer) {
15101
+ scenceView_partent = scenceView;
15102
+ viewModel._scenceView_partent = scenceView;
15103
+ if (!props.useCustomData) {
14989
15104
  formItem = scenceView._props;
14990
- if (!formItem.scenceInfo) {
15105
+ if (!formItem.service && !formItem.scenceInfo) {
14991
15106
  formItem.scenceInfo = scenceView_partent._layerManager.getScenceInfo();
15107
+ if(formItem.scenceInfo?.layer?.layerTreeData?.length ==0) formItem.scenceInfo = null;
14992
15108
  }
14993
- showMap.value = true;
14994
15109
  }
14995
- });
14996
- } else {
14997
- showMap.value = true;
14998
- }
15110
+ showMap.value = true;
15111
+ }
15112
+ });
14999
15113
  setTitleDataform.value.data.title = props.printTitle || language.value.oneimage;
15000
15114
  papAnchor.value = "portrait";
15001
15115
  borderStyleValue.value = "printborder1";
@@ -15027,7 +15141,7 @@ let scenceView_print = null;
15027
15141
  if (!formItem.service && !formItem.scenceInfo) {
15028
15142
  if (scenceView_partent) {
15029
15143
  let _promises = [];
15030
- for (let index = scenceView_partent._layerManager._layerListData.length - 1; index >= 0; index--) {
15144
+ for (let index = 0; index < scenceView_partent._layerManager._layerListData.length; index++) {
15031
15145
  const element = scenceView_partent._layerManager._layerListData[index];
15032
15146
  if (props.onlyShowCheckLayer) {
15033
15147
  if (!scenceView_partent._layerManager.getLayerCheckedListKey().includes(element.guid)) continue;
@@ -18004,7 +18118,7 @@ return (_ctx, _cache) => {
18004
18118
  ref: printContentDiv
18005
18119
  }, [
18006
18120
  ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(showMap))
18007
- ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(SceneView), {
18121
+ ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(sceneview_SceneView), {
18008
18122
  key: 0,
18009
18123
  target: "scencePrint",
18010
18124
  options: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(formItem).options,
@@ -18587,15 +18701,37 @@ class MeasureViewModel {
18587
18701
  measureEvent = null; //测量事件
18588
18702
  activeEvent = null; //活动事件
18589
18703
  nauticalMileUnit = "nmi";
18590
- constructor(viewer) {
18591
- this._measureHandler = new Cesium.Kq3dMeasureHandler(viewer, { exaggerateCompute: true });
18592
- this._viewer = viewer;
18704
+ drawTipsStyle = null;
18705
+ _language = null;
18706
+ constructor(scenceView) {
18707
+ this._viewer = scenceView._viewer;
18708
+ this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer, { exaggerateCompute: true});
18593
18709
  this.measureEvent = this._measureHandler.measureEvent;
18594
18710
  this.activeEvent = this._measureHandler.activeEvent;
18711
+ this.drawTipsStyle = scenceView._drawTipsStyle;
18712
+ this._language = scenceView._language;
18713
+ if(scenceView._props.showDrawTipsStyle){
18714
+ this._measureHandler.showDrawTips = scenceView._props.showDrawTipsStyle;
18715
+ }
18716
+ }
18717
+ // 设置绘制鼠标提示
18718
+ setDrawTipsStyle(params = {}){
18719
+ if (!this._measureHandler) return;
18720
+ const processedParams = Object.entries(params).reduce((acc, [key, value]) => {
18721
+ acc[key] = (value === '') ? null : value;
18722
+ return acc;
18723
+ }, {});
18724
+ this._measureHandler.drawTipsStyle = {
18725
+ ...(this.drawTipsStyle || {}),
18726
+ ...processedParams
18727
+ };
18595
18728
  }
18596
-
18597
18729
  //距离测量
18598
18730
  distanceMeasure(mode) {
18731
+ this.setDrawTipsStyle({
18732
+ beforeDrawText: this._language?.measureBeforeDrawText,
18733
+ duringDrawText: this._language?.measureDuringDrawText
18734
+ });
18599
18735
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18600
18736
  if (mode === "ground") {
18601
18737
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.TerrainDistance);
@@ -18608,12 +18744,20 @@ class MeasureViewModel {
18608
18744
 
18609
18745
  //高度测量(三角测量)
18610
18746
  heightMeasure() {
18747
+ this.setDrawTipsStyle({
18748
+ beforeDrawText: this._language?.measureBeforeDrawText,
18749
+ duringDrawText: this._language?.measureHeightDuringDrawText
18750
+ });
18611
18751
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18612
18752
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.ComplexDistance);
18613
18753
  }
18614
18754
 
18615
18755
  //面积测量
18616
18756
  areaMeasure(mode) {
18757
+ this.setDrawTipsStyle({
18758
+ beforeDrawText: this._language?.measureBeforeDrawText,
18759
+ duringDrawText: this._language?.measureDuringDrawText
18760
+ });
18617
18761
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18618
18762
  if (mode === "ground") {
18619
18763
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.TerrainArea);
@@ -18626,24 +18770,40 @@ class MeasureViewModel {
18626
18770
 
18627
18771
  //方位角测量
18628
18772
  azimuthMeasure() {
18773
+ this.setDrawTipsStyle({
18774
+ beforeDrawText: this._language?.measureBeforeDrawText,
18775
+ duringDrawText: this._language?.measureHeightDuringDrawText
18776
+ });
18629
18777
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18630
18778
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.Azimuth);
18631
18779
  }
18632
18780
 
18633
18781
  //坐标测量
18634
18782
  coordinateMeasure() {
18783
+ this.setDrawTipsStyle({
18784
+ beforeDrawText: this._language?.measureCoordinateBeforeDrawText,
18785
+ duringDrawText: this._language?.measureCoordinateBeforeDrawText
18786
+ });
18635
18787
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18636
18788
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.Coordinate);
18637
18789
  }
18638
18790
 
18639
18791
  //地形坡度测量
18640
18792
  terrainSlopeMeasure() {
18793
+ this.setDrawTipsStyle({
18794
+ beforeDrawText: this._language?.measureBeforeDrawText,
18795
+ duringDrawText: this._language?.measureSlopeBeforeDrawText
18796
+ });
18641
18797
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18642
18798
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.TerrainSlope);
18643
18799
  }
18644
18800
 
18645
18801
  //场景坡度测量
18646
18802
  sceneSlopeMeasure() {
18803
+ this.setDrawTipsStyle({
18804
+ beforeDrawText: this._language?.measureBeforeDrawText,
18805
+ duringDrawText: this._language?.measureSlopeBeforeDrawText
18806
+ });
18647
18807
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
18648
18808
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.SceneSlope);
18649
18809
  }
@@ -18970,7 +19130,7 @@ let headerTempRef = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref
18970
19130
 
18971
19131
  gis_utils_.utils.getWebMap(props.target, scenceView => {
18972
19132
  if (scenceView) {
18973
- viewModel = new MeasureViewModel(scenceView._viewer);
19133
+ viewModel = new MeasureViewModel(scenceView);
18974
19134
  viewModel.nauticalMileUnit = nauticalMileUnit;
18975
19135
  //注册测量事件,以获取测量结果
18976
19136
  viewModel.measureEvent.addEventListener(function (res) {
@@ -20738,17 +20898,19 @@ class GPUSpatialQueryViewModel {
20738
20898
  if (flag) {
20739
20899
  this.clear();
20740
20900
  this.findLayers();
20741
- this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
20742
- if (!shape.groupName || shape.groupName !== "GPUSpatialQueryDraw") return;
20743
- if (shape) {
20744
- that._center = shape.position;
20745
- setTimeout(() => {
20746
- //绘制跟高亮显示有冲突,所以延时执行查询
20747
- that.startQuery();
20748
- }, 10);
20749
- }
20750
- that._drawManager && that._drawManager.clearDrawGroup("GPUSpatialQueryDraw");
20751
- }, "GPUSpatialQueryDraw", true);
20901
+ if(this._drawManager) {
20902
+ this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
20903
+ if (!shape.groupName || shape.groupName !== "GPUSpatialQueryDraw") return;
20904
+ if (shape) {
20905
+ that._center = shape.position;
20906
+ setTimeout(() => {
20907
+ //绘制跟高亮显示有冲突,所以延时执行查询
20908
+ that.startQuery();
20909
+ }, 10);
20910
+ }
20911
+ that._drawManager.clearDrawGroup("GPUSpatialQueryDraw");
20912
+ }, "GPUSpatialQueryDraw", true);
20913
+ }
20752
20914
  } else {
20753
20915
  message({
20754
20916
  message: this._language["addModelAnalysisTips"],
@@ -20768,8 +20930,9 @@ class GPUSpatialQueryViewModel {
20768
20930
 
20769
20931
  //清除全部结果
20770
20932
  clear() {
20933
+ this._drawManager?.clearDrawGroup("GPUSpatialQueryDraw");
20771
20934
  this._gpuSpatialQuery && this._gpuSpatialQuery.clear();
20772
- this._drawManager.stopDraw();
20935
+ this._drawManager?.stopDraw();
20773
20936
  }
20774
20937
 
20775
20938
  //销毁
@@ -22951,7 +23114,7 @@ class LimitHeightAnalysisViewModel {
22951
23114
  that._options.positions = shape._controlPoints;
22952
23115
  that.drawPolygon();
22953
23116
  }
22954
- that._drawManager && that._drawManager.clearDrawGroup("LimitHeightAnalysisDraw");
23117
+ that._drawManager.clearDrawGroup("LimitHeightAnalysisDraw");
22955
23118
  }, "LimitHeightAnalysisDraw");
22956
23119
  }
22957
23120
  } else {
@@ -22989,6 +23152,7 @@ class LimitHeightAnalysisViewModel {
22989
23152
  clear() {
22990
23153
  this._limitHeightAnalysis && this._limitHeightAnalysis.remove();
22991
23154
  this._drawManager && this._drawManager.stopDraw();
23155
+ this._drawManager?.clearDrawGroup("LimitHeightAnalysisDraw");
22992
23156
  }
22993
23157
  // 销毁
22994
23158
  destroy() {
@@ -23539,12 +23703,12 @@ class TerrainProfileAnalysisViewModel {
23539
23703
  if (this._viewer.terrainProvider.availability) {
23540
23704
  if (this._viewer.terrainProvider && !this._viewer.terrainProvider._heightmapStructure) {
23541
23705
  this.clear();
23542
- this._drawManager.startDraw("polyline", { clampToGround: true }, (feature, { shape }) => {
23706
+ this._drawManager?.startDraw("polyline", { clampToGround: true }, (feature, { shape }) => {
23543
23707
  if (!shape.groupName || shape.groupName !== "TerrainProfileAnalysisDraw") return;
23544
23708
  if (shape) {
23545
23709
  that._terrainSlopeAnalyse.positions = shape._controlPoints;
23546
23710
  }
23547
- that._drawManager && that._drawManager.clearDrawGroup("TerrainProfileAnalysisDraw");
23711
+ that._drawManager.clearDrawGroup("TerrainProfileAnalysisDraw");
23548
23712
  }, "TerrainProfileAnalysisDraw");
23549
23713
  } else {
23550
23714
  message({
@@ -23561,6 +23725,7 @@ class TerrainProfileAnalysisViewModel {
23561
23725
  }
23562
23726
  //清除
23563
23727
  clear() {
23728
+ this._drawManager?.clearDrawGroup("TerrainProfileAnalysisDraw");
23564
23729
  this._drawManager && this._drawManager.stopDraw();
23565
23730
  this._terrainSlopeAnalyse && this._terrainSlopeAnalyse.clear();
23566
23731
  for (let index = 0; index < this.divPointArr.length; index++) {
@@ -24695,13 +24860,13 @@ class SceneAdvancedToImageViewModel {
24695
24860
  start() {
24696
24861
  var that = this;
24697
24862
  this.clear();
24698
- this._drawManager.startDraw("point", { clampToGround: true, image: null }, (feature, { shape }) => {
24863
+ this._drawManager?.startDraw("point", { clampToGround: true, image: null }, (feature, { shape }) => {
24699
24864
  if (!shape.groupName || shape.groupName !== "SceneAdvancedToImageDraw") return;
24700
24865
  if (shape) {
24701
24866
  that._options.position = shape.position;
24702
24867
  that.addSatellitePyramidPrimitive(that._options.position);
24703
24868
  }
24704
- that._drawManager && that._drawManager.clearDrawGroup("SceneAdvancedToImageDraw");
24869
+ that._drawManager.clearDrawGroup("SceneAdvancedToImageDraw");
24705
24870
  }, "SceneAdvancedToImageDraw");
24706
24871
  }
24707
24872
  paramsChanged(key, val) {
@@ -24733,7 +24898,8 @@ class SceneAdvancedToImageViewModel {
24733
24898
  }
24734
24899
  //清除全部结果
24735
24900
  clear() {
24736
- this._drawManager.stopDraw();
24901
+ this._drawManager?.stopDraw();
24902
+ this._drawManager?.clearDrawGroup("SceneAdvancedToImageDraw");
24737
24903
  if (this._satellitePyramidPrimitive) {
24738
24904
  this._viewer.scene.primitives.remove(this._satellitePyramidPrimitive);
24739
24905
  this._satellitePyramidPrimitive = null;
@@ -25360,10 +25526,12 @@ class RadarScanAnalysisViewModel {
25360
25526
  };
25361
25527
  _drawManager = null; // 绘制对象
25362
25528
  _radarScan = null; // 扫描对象
25529
+ _language = null;
25363
25530
  constructor(scenceView, option) {
25364
25531
  this._viewer = scenceView._viewer;
25365
25532
  Object.assign(this._options, option);
25366
25533
  this._drawManager = scenceView._drawManager;
25534
+ this._language = scenceView._language;
25367
25535
  }
25368
25536
  //获取颜色rgba值
25369
25537
  getRgba(color) {
@@ -25465,7 +25633,7 @@ class RadarScanAnalysisViewModel {
25465
25633
  });
25466
25634
  }
25467
25635
  }
25468
- that._drawManager && that._drawManager.clearDrawGroup("RadarScanAnalysis");
25636
+ that._drawManager.clearDrawGroup("RadarScanAnalysis");
25469
25637
  }, "RadarScanAnalysis");
25470
25638
  }
25471
25639
  }
@@ -25474,6 +25642,7 @@ class RadarScanAnalysisViewModel {
25474
25642
  this._radarScan && this._radarScan.destroy?.();
25475
25643
  this._radarScan = null;
25476
25644
  this._drawManager && this._drawManager.stopDraw();
25645
+ this._drawManager && this._drawManager.clearDrawGroup("RadarScanAnalysis");
25477
25646
  }
25478
25647
  // 销毁
25479
25648
  destroy() {
@@ -26075,6 +26244,7 @@ class ScanEffectViewModel {
26075
26244
  _drawManager = null; // 绘制对象
26076
26245
  _lineScan = null;
26077
26246
  _ringScan = null;
26247
+ _language = null;
26078
26248
  constructor(scenceView, option) {
26079
26249
  this._viewer = scenceView._viewer;
26080
26250
  this._options.viewer = this._viewer;
@@ -26098,6 +26268,7 @@ class ScanEffectViewModel {
26098
26268
  });
26099
26269
  this._viewer.scene.globe.depthTestAgainstTerrain = true;
26100
26270
  this._drawManager = scenceView._drawManager;
26271
+ this._language = scenceView._language;
26101
26272
  }
26102
26273
  addScaningLine(cartesian) {
26103
26274
  if (this._options.scanMode == 0) {
@@ -26441,7 +26612,7 @@ class ScanEffectViewModel {
26441
26612
  that._options.origin = shape.position;
26442
26613
  that.addScaningLine(shape.position);
26443
26614
  }
26444
- that._drawManager && that._drawManager.clearDrawGroup("ScanEffectDraw");
26615
+ that._drawManager.clearDrawGroup("ScanEffectDraw");
26445
26616
  }, "ScanEffectDraw");
26446
26617
  }
26447
26618
  } else {
@@ -26468,7 +26639,8 @@ class ScanEffectViewModel {
26468
26639
  clear() {
26469
26640
  this.removeScan();
26470
26641
  this._options.origin = null;
26471
- this._drawManager.stopDraw();
26642
+ this._drawManager?.clearDrawGroup("ScanEffectDraw");
26643
+ this._drawManager?.stopDraw();
26472
26644
  }
26473
26645
  // 销毁
26474
26646
  destroy() {
@@ -28922,6 +29094,16 @@ class ModelExcavateViewModel {
28922
29094
  }
28923
29095
  }
28924
29096
  this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
29097
+ if(scenceView._props.showDrawTipsStyle){
29098
+ this._measureHandler.showDrawTips = scenceView._props.showDrawTipsStyle;
29099
+ this._measureHandler.drawTipsStyle = {
29100
+ ...scenceView._drawTipsStyle,
29101
+ ...{
29102
+ beforeDrawText: this._language?.beforeDrawText,
29103
+ duringDrawText: this._language?.duringDrawText
29104
+ }
29105
+ }
29106
+ }
28925
29107
  this._measureHandler.measureEvent.addEventListener(function (result) {
28926
29108
  that._measureResult = result;
28927
29109
  result.measureResult.label.show = false;
@@ -29449,6 +29631,16 @@ class ModelFlatViewModel {
29449
29631
  // }
29450
29632
  // });
29451
29633
  this._measureHandler = new Cesium.Kq3dMeasureHandler(this._viewer);
29634
+ if(scenceView._props.showDrawTipsStyle){
29635
+ this._measureHandler.showDrawTips = scenceView._props.showDrawTipsStyle;
29636
+ this._measureHandler.drawTipsStyle = {
29637
+ ...scenceView._drawTipsStyle,
29638
+ ...{
29639
+ beforeDrawText: this._language?.beforeDrawText,
29640
+ duringDrawText: this._language?.duringDrawText
29641
+ }
29642
+ }
29643
+ }
29452
29644
  this._measureHandler.measureEvent.addEventListener(function (result) {
29453
29645
  that._measureResult = result;
29454
29646
  result.measureResult.label.show = false;
@@ -29500,7 +29692,6 @@ class ModelFlatViewModel {
29500
29692
  if (flag) {
29501
29693
  this.remove(!this._options.showFlattenedPolygons);
29502
29694
  this._measureHandler.startMeasure(Cesium.Kq3dMeasureMode.HorizontalArea);
29503
- // this._drawManager.startDraw("polygon", { clampToGround: true });
29504
29695
  } else {
29505
29696
  message({
29506
29697
  message: this._language["addModelTips"],
@@ -29536,7 +29727,6 @@ class ModelFlatViewModel {
29536
29727
  }
29537
29728
  // 清除绘制
29538
29729
  remove(bool) {
29539
- this._drawManager.stopDraw();
29540
29730
  if(bool){
29541
29731
  this._flatteningPolygonTex && this._flatteningPolygonTex.removeAllFlattenedPolygon();
29542
29732
  for (var i = 0; i < this._assistPolygons.length; i++) {
@@ -29934,8 +30124,12 @@ class WindySlicingViewModel {
29934
30124
  case "mode":
29935
30125
  this.removeInputAction();
29936
30126
  this.removeVolumePrimitive();
30127
+ this.clearDrawGroup();
29937
30128
  if (this._options.mode === "point") {
29938
- this._windySlicingDrawManager.stopDraw();
30129
+ this._windySlicingDrawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
30130
+ if (!shape.groupName || shape.groupName !== "windySlicingPointDraw") return;
30131
+ this._windySlicingDrawManager.clearDrawGroup("windySlicingPointDraw");
30132
+ }, "windySlicingPointDraw");
29939
30133
  this.drawPolylineHandler();
29940
30134
  } else if (this._options.mode === "line") {
29941
30135
  this.drawPolylineHandler(function (newPositions) {
@@ -29943,7 +30137,10 @@ class WindySlicingViewModel {
29943
30137
  that.windySlicingPolylineSlicing(newPositions);
29944
30138
  });
29945
30139
  this._isDrawPolyline = true;
29946
- this._windySlicingDrawManager.startDraw("polyline", { clampToGround: true }, null, "windySlicingDraw");
30140
+ this._windySlicingDrawManager.startDraw("polyline", { clampToGround: true }, (feature, { shape }) => {
30141
+ if (!shape.groupName || shape.groupName !== "windySlicingLineDraw") return;
30142
+ this._windySlicingDrawManager.clearDrawGroup("windySlicingLineDraw");
30143
+ }, "windySlicingLineDraw");
29947
30144
  } else if (this._options.mode === "polygon") {
29948
30145
  this._windySlicingDrawManager.startDraw("rectangle", { clampToGround: true }, (feature, { shape }) => {
29949
30146
  if (!shape.groupName || shape.groupName !== "windySlicingDraw") return;
@@ -30755,14 +30952,20 @@ class WindySlicingViewModel {
30755
30952
  var imageDataUrl = canvas.toDataURL('image/png');
30756
30953
  return imageDataUrl;
30757
30954
  }
30758
-
30955
+ clearDrawGroup() {
30956
+ if (this._windySlicingDrawManager) {
30957
+ this._windySlicingDrawManager.stopDraw();
30958
+ this._windySlicingDrawManager.clearDrawGroup("windySlicingLineDraw");
30959
+ this._windySlicingDrawManager.clearDrawGroup("windySlicingPointDraw");
30960
+ this._windySlicingDrawManager.clearDrawGroup("windySlicingDraw");
30961
+ }
30962
+ }
30759
30963
  //清除
30760
30964
  clear() {
30965
+ this.clearDrawGroup();
30761
30966
  this.removeVolumePrimitive();
30762
30967
  this.removeInputAction();
30763
30968
  this._isDrawPolyline = false;
30764
- this._windySlicingDrawManager.stopDraw();
30765
- this._windySlicingDrawManager.clearDrawGroup("windySlicingDraw");
30766
30969
  this._currentVolumePosition = null;
30767
30970
  this._currentVolumeOption = null;
30768
30971
  this.volumelines = null;
@@ -33257,11 +33460,11 @@ class SightlineAnalysisViewModel {
33257
33460
  _billboards = []; // 点位图标billboards集合
33258
33461
  _language = null;
33259
33462
 
33260
- constructor(scenceView, options, language) {
33463
+ constructor(scenceView, options) {
33261
33464
  this._viewer = scenceView._viewer;
33262
33465
  this._viewer.scene.postProcessStages._fxaa.enabled = true;
33263
33466
  this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
33264
- this._language = language;
33467
+ this._language = scenceView._language;
33265
33468
  options.viewer = this._viewer;
33266
33469
  if (options.visibleColor) {
33267
33470
  options.visibleColor = Cesium.Color.fromCssColorString(options.visibleColor);
@@ -33319,7 +33522,7 @@ class SightlineAnalysisViewModel {
33319
33522
  </div>`;
33320
33523
  html = html.replace('{X}', longitude).replace('{Y}', latitude).replace('{Z}', height);
33321
33524
  if (this._language) {
33322
- html = html.replace('X', this._language.value.longitude).replace('Y', this._language.value.latitude).replace('Z', this._language.value.elevation);
33525
+ html = html.replace('X', this._language.longitude).replace('Y', this._language.latitude).replace('Z', this._language.elevation);
33323
33526
  }
33324
33527
 
33325
33528
  var divpoint = new Cesium.Kq3dHtmlTag(this._viewer, {
@@ -33386,6 +33589,7 @@ class SightlineAnalysisViewModel {
33386
33589
  addSeePoint() {
33387
33590
  let that = this;
33388
33591
  this._addType = 1;
33592
+ if(!this._drawManager) return;
33389
33593
  this._drawManager.startDraw("point", { image: const_image_.OBSERVATION_POINT }, (feature, { shape }) => {
33390
33594
  if (!shape.groupName || shape.groupName !== "SightlineAnalysisDraw") return;
33391
33595
  if (shape && shape.type === "marker") {
@@ -33410,6 +33614,7 @@ class SightlineAnalysisViewModel {
33410
33614
  let that = this;
33411
33615
  if (!this._sightlineAnalysis._seePoint) return;
33412
33616
  this._addType = 2;
33617
+ if(!this._drawManager) return;
33413
33618
  this._drawManager.startDraw("point", { image: const_image_.TARGET_POINT }, (feature, { shape }) => {
33414
33619
  if (!shape.groupName || shape.groupName !== "SightlineAnalysisDraw") return;
33415
33620
  if (shape && shape.type === "marker") {
@@ -33425,7 +33630,7 @@ class SightlineAnalysisViewModel {
33425
33630
  that.highlightObstacles(result.id);
33426
33631
  }
33427
33632
  }
33428
- that._drawManager && that._drawManager.clearDrawGroup("SightlineAnalysisDraw");
33633
+ that._drawManager.clearDrawGroup("SightlineAnalysisDraw");
33429
33634
  }, "SightlineAnalysisDraw", true);
33430
33635
  }
33431
33636
 
@@ -33450,7 +33655,8 @@ class SightlineAnalysisViewModel {
33450
33655
  }
33451
33656
  //清除全部
33452
33657
  clearAll() {
33453
- this._drawManager.stopDraw();
33658
+ this._drawManager?.clearDrawGroup("SightlineAnalysisDraw");
33659
+ this._drawManager?.stopDraw();
33454
33660
  this.clearDisplay();
33455
33661
  this.clearHighlights();
33456
33662
  this.clearBillboards();
@@ -33619,7 +33825,7 @@ headerTempTitle.value = language.value.sightlineAnalysis;
33619
33825
  obstacleColor: formItem.obstacleColor,
33620
33826
  isLabel: formItem.isLabel
33621
33827
  };
33622
- viewModel = new SightlineAnalysisViewModel(scenceView, options, language);
33828
+ viewModel = new SightlineAnalysisViewModel(scenceView, options);
33623
33829
  }
33624
33830
  });
33625
33831
  });
@@ -34635,6 +34841,7 @@ class ShadowAnalysisViewModel {
34635
34841
 
34636
34842
  // 清除全部结果
34637
34843
  clear() {
34844
+ this._globaOptions._drawManager?.clearDrawGroup("ShadowAnalysisDraw");
34638
34845
  this._globaOptions._drawManager && this._globaOptions._drawManager.stopDraw();
34639
34846
  if (this._shadowAnalysis) {
34640
34847
  this._globaOptions.viewer.scene.primitives.remove(this._shadowAnalysis);
@@ -35388,9 +35595,9 @@ shadowanalysis_ShadowAnalysis.install = (Vue, opts) => {
35388
35595
  */
35389
35596
  //分析逻辑类
35390
35597
  let floatingPoint;
35391
- let drawPoints = [];
35598
+ let drawPoints = (/* unused pure expression or super */ null && ([]));
35392
35599
  let activeShapePoints = [];
35393
- let activeCartographicPoints = [];
35600
+ let activeCartographicPoints = (/* unused pure expression or super */ null && ([]));
35394
35601
 
35395
35602
  class ModelProfileAnalysisViewModel {
35396
35603
  _profileAnalysis = null; //剖面分析三维对象
@@ -35402,8 +35609,10 @@ class ModelProfileAnalysisViewModel {
35402
35609
  width: 360,
35403
35610
  height: 360
35404
35611
  };
35612
+ _drawManager = null;
35405
35613
  constructor(scenceView, viewModel, chart) {
35406
- this._language = scenceView._language;
35614
+ this._drawManager = scenceView._drawManager;
35615
+ this._language = scenceView._language || {};
35407
35616
  this._globaOptions.viewModel = {
35408
35617
  angle: viewModel.perspectiveAngle || 90,
35409
35618
  frustumH: viewModel.targetAreaHeight || 200,
@@ -35457,14 +35666,7 @@ class ModelProfileAnalysisViewModel {
35457
35666
  this._globaOptions._handler.setInputAction(function (event) {
35458
35667
  var earthPosition = that._globaOptions.viewer.scene.pickPosition(event.position);
35459
35668
  if (window.Cesium.defined(earthPosition)) {
35460
- //绘制点
35461
- floatingPoint = that.createPoint(earthPosition);
35462
- drawPoints.push(floatingPoint);
35463
-
35464
35669
  activeShapePoints.push(earthPosition);
35465
- let earthPositionCarto = window.Cesium.Cartographic.fromCartesian(earthPosition);
35466
- activeCartographicPoints.push(earthPositionCarto);
35467
-
35468
35670
  //单线分析结果显示
35469
35671
  if (activeShapePoints.length == 2) {
35470
35672
  var newPositions = [];
@@ -35472,20 +35674,19 @@ class ModelProfileAnalysisViewModel {
35472
35674
  var newPosition = window.Cesium.Cartographic.fromCartesian(position);
35473
35675
  newPositions.push(newPosition);
35474
35676
  });
35475
-
35476
35677
  that._profileAnalysis.elevation = newPositions;
35477
35678
  setTimeout(() => {
35478
35679
  that.updatePorfileAnalysis();
35479
35680
  }, 200);
35480
-
35481
- drawPoints.forEach(function (point) {
35482
- that._globaOptions.viewer.entities.remove(point);
35483
- });
35484
- drawPoints = [];
35485
35681
  activeShapePoints = [];
35682
+ that._drawManager?.stopDraw?.();
35486
35683
  }
35487
35684
  }
35488
35685
  }, window.Cesium.ScreenSpaceEventType.LEFT_CLICK);
35686
+ this._drawManager?.startDraw?.("polyline", { clampToGround: true }, (feature, { shape }) => {
35687
+ if (!shape.groupName || shape.groupName !== "ModelProfileAnalysis") return;
35688
+ that._drawManager.clearDrawGroup("ModelProfileAnalysis");
35689
+ }, "ModelProfileAnalysis");
35489
35690
  } else {
35490
35691
  message({
35491
35692
  message: this._language["addModelTips"],
@@ -35607,8 +35808,10 @@ class ModelProfileAnalysisViewModel {
35607
35808
  }
35608
35809
  // 清理剖面分析
35609
35810
  remove() {
35811
+ this._drawManager?.clearDrawGroup("ModelProfileAnalysis");
35610
35812
  this._ProfileAnalysisChartVis.value = false;
35611
35813
  this._profileAnalysis && this._profileAnalysis.clearPrimitives();
35814
+ this._drawManager?.stopDraw();
35612
35815
  }
35613
35816
  //清除全部结果
35614
35817
  clear() {
@@ -37003,29 +37206,31 @@ class TerrainOperationViewModel {
37003
37206
  if (this._globaOptions.viewer.terrainProvider.availability) {
37004
37207
  if (this._globaOptions.viewer.terrainProvider && !this._globaOptions.viewer.terrainProvider._heightmapStructure) {
37005
37208
  this.clear();
37006
- this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
37007
- if (!shape.groupName || shape.groupName !== "TerrainOperationDraw") return;
37008
- if (shape) {
37009
- that._globaOptions.positions = shape._controlPoints;
37010
- if (that._terrainStyle === 1) {
37011
- that._positions.push(shape._controlPoints);
37012
- if (that._terrainexcavationext) {
37013
- that.setTerrainExcavationAddPolygon();
37014
- } else {
37015
- that.createTerrainExcavation(() => {
37209
+ if(this._drawManager) {
37210
+ this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
37211
+ if (!shape.groupName || shape.groupName !== "TerrainOperationDraw") return;
37212
+ if (shape) {
37213
+ that._globaOptions.positions = shape._controlPoints;
37214
+ if (that._terrainStyle === 1) {
37215
+ that._positions.push(shape._controlPoints);
37216
+ if (that._terrainexcavationext) {
37016
37217
  that.setTerrainExcavationAddPolygon();
37017
- });
37018
- }
37019
- } else if (that._terrainStyle === 2) {
37020
- if (that._terrainmodification) {
37021
- that.setTerrainModification();
37022
- } else {
37023
- that.createTerrainModification();
37218
+ } else {
37219
+ that.createTerrainExcavation(() => {
37220
+ that.setTerrainExcavationAddPolygon();
37221
+ });
37222
+ }
37223
+ } else if (that._terrainStyle === 2) {
37224
+ if (that._terrainmodification) {
37225
+ that.setTerrainModification();
37226
+ } else {
37227
+ that.createTerrainModification();
37228
+ }
37024
37229
  }
37025
37230
  }
37026
- }
37027
- that._drawManager && that._drawManager.clearDrawGroup("TerrainOperationDraw");
37028
- }, "TerrainOperationDraw");
37231
+ that._drawManager.clearDrawGroup("TerrainOperationDraw");
37232
+ }, "TerrainOperationDraw");
37233
+ }
37029
37234
  } else {
37030
37235
  message({
37031
37236
  message: this._language["stkTerrainAnalysisTips"],
@@ -37068,7 +37273,8 @@ class TerrainOperationViewModel {
37068
37273
  }
37069
37274
  //清除全部结果
37070
37275
  clear() {
37071
- this._drawManager.stopDraw();
37276
+ this._drawManager?.clearDrawGroup("TerrainOperationDraw");
37277
+ this._drawManager?.stopDraw();
37072
37278
  // 销毁地形开挖
37073
37279
  if (this._terrainexcavationext) {
37074
37280
  this._terrainexcavationext.destroy();
@@ -37526,25 +37732,27 @@ class ExcavateFillAnalysisViewModel {
37526
37732
  // 判断是否添加了地形
37527
37733
  if (this._options.viewer.terrainProvider.availability) {
37528
37734
  if (this._options.viewer.terrainProvider && !this._options.viewer.terrainProvider._heightmapStructure) {
37529
- this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
37530
- if (!shape.groupName || shape.groupName !== "ExcavateFillAnalysisDraw") return;
37531
- that._drawManager.clearDrawGroup("ExcavateFillAnalysisDraw");
37532
- if (shape) {
37533
- if(typeof that._restrictedArea === 'number' && !isNaN(that._restrictedArea) && isFinite(that._restrictedArea)){
37534
- const area = that._scenceView.computePolygonArea(shape._controlPoints);
37535
- if((area / 1000000) > Number(that._restrictedArea)){
37536
- message({
37537
- message: this._language["restrictedAreaTips"],
37538
- type: "warning"
37539
- });
37540
- return;
37735
+ if(this._drawManager) {
37736
+ this._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
37737
+ if (!shape.groupName || shape.groupName !== "ExcavateFillAnalysisDraw") return;
37738
+ that._drawManager.clearDrawGroup("ExcavateFillAnalysisDraw");
37739
+ if (shape) {
37740
+ if(typeof that._restrictedArea === 'number' && !isNaN(that._restrictedArea) && isFinite(that._restrictedArea)){
37741
+ const area = that._scenceView.computePolygonArea(shape._controlPoints);
37742
+ if((area / 1000000) > Number(that._restrictedArea)){
37743
+ message({
37744
+ message: this._language["restrictedAreaTips"],
37745
+ type: "warning"
37746
+ });
37747
+ return;
37748
+ }
37541
37749
  }
37750
+ that._options.positions = that.coordinateTransform(shape._controlPoints);
37751
+ that._excavateFillAnalysis = new Cesium.Kq3dCutFill(that._options);
37752
+ that.callback && that.callback();
37542
37753
  }
37543
- that._options.positions = that.coordinateTransform(shape._controlPoints);
37544
- that._excavateFillAnalysis = new Cesium.Kq3dCutFill(that._options);
37545
- that.callback && that.callback();
37546
- }
37547
- }, "ExcavateFillAnalysisDraw");
37754
+ }, "ExcavateFillAnalysisDraw");
37755
+ }
37548
37756
  } else {
37549
37757
  message({
37550
37758
  message: this._language["stkTerrainAnalysisTips"],
@@ -37561,7 +37769,8 @@ class ExcavateFillAnalysisViewModel {
37561
37769
 
37562
37770
  //清除全部结果
37563
37771
  clear() {
37564
- this._drawManager.stopDraw();
37772
+ this._drawManager?.clearDrawGroup("ExcavateFillAnalysisDraw");
37773
+ this._drawManager?.stopDraw();
37565
37774
  this._excavateFillAnalysis && this._excavateFillAnalysis.removeAll();
37566
37775
  }
37567
37776
 
@@ -38087,6 +38296,16 @@ class FloodAnalysisViewModel {
38087
38296
  this._floodModelAnalysis.colorImage = options.colorImage;
38088
38297
  var that = this;
38089
38298
  this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
38299
+ if(scenceView._props.showDrawTipsStyle){
38300
+ this._measureHandler.showDrawTips = scenceView._props.showDrawTipsStyle;
38301
+ this._measureHandler.drawTipsStyle = {
38302
+ ...scenceView._drawTipsStyle,
38303
+ ...{
38304
+ beforeDrawText: this._language?.beforeDrawText,
38305
+ duringDrawText: this._language?.duringDrawText
38306
+ }
38307
+ }
38308
+ }
38090
38309
  this._measureHandler.measureEvent.addEventListener(function (result) {
38091
38310
  that._measureResult = result;
38092
38311
  result.measureResult.label.show = false;
@@ -38920,7 +39139,7 @@ class SlopeAnalysisViewModel {
38920
39139
  slopeAnalysis: viewModel.slopeAnalysis,
38921
39140
  };
38922
39141
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
38923
- // this._globaOptions.viewer.scene.globe.enableLighting = true;
39142
+ this._globaOptions.viewer.scene.globe.enableLighting = true;
38924
39143
  this._globaOptions._drawManager = scenceView._drawManager;
38925
39144
  // that._slopeAnalysis = new Cesium.Kq3dSlope({
38926
39145
  // viewer: that._globaOptions.viewer,
@@ -39127,12 +39346,14 @@ class SlopeAnalysisViewModel {
39127
39346
  }
39128
39347
  // 清除全部结果
39129
39348
  clear() {
39349
+ this._globaOptions._drawManager?.clearDrawGroup("SlopeAnalysisDraw");
39130
39350
  this._globaOptions._drawManager && this._globaOptions._drawManager.stopDraw();
39131
39351
  this._slopeAnalysis && this._slopeAnalysis.destroy();
39132
39352
  this._slopeAnalysis = null;
39133
39353
  }
39134
39354
  // 销毁
39135
39355
  destroy() {
39356
+ this._globaOptions.viewer.scene.globe.enableLighting = false;
39136
39357
  this._slopeAnalysis && this._slopeAnalysis.destroy();
39137
39358
  this._slopeAnalysis = null;
39138
39359
  }
@@ -39916,7 +40137,7 @@ class AspectAnalysisViewModel {
39916
40137
  if (this._globaOptions.viewer.terrainProvider && !this._globaOptions.viewer.terrainProvider._heightmapStructure) {
39917
40138
  if (this._globaOptions._drawManager) {
39918
40139
  this.clear();
39919
- this._globaOptions._drawManager.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
40140
+ this._globaOptions?._drawManager?.startDraw?.("polygon", { clampToGround: true }, (feature, { shape }) => {
39920
40141
  if (!shape.groupName || shape.groupName !== "AspectAnalysisDraw") return;
39921
40142
  that._globaOptions._drawManager.clearDrawGroup("AspectAnalysisDraw");
39922
40143
  if (shape) {
@@ -39961,6 +40182,7 @@ class AspectAnalysisViewModel {
39961
40182
  }
39962
40183
  // 清除全部结果
39963
40184
  clear() {
40185
+ this._globaOptions?._drawManager?.clearDrawGroup("AspectAnalysisDraw");
39964
40186
  this._globaOptions._drawManager && this._globaOptions._drawManager.stopDraw();
39965
40187
  this._aspectAnalysis && this._aspectAnalysis.clear();
39966
40188
  }
@@ -40392,6 +40614,8 @@ class SlopeAspectAnalysisViewModel {
40392
40614
  ];
40393
40615
  _scenceView = null;
40394
40616
  _restrictedArea = null;
40617
+ // 开启光阴
40618
+ _showEnableLighting = false;
40395
40619
  constructor(scenceView, viewModel) {
40396
40620
  this._language = scenceView._language;
40397
40621
  this._globaOptions.viewer = scenceView._viewer;
@@ -40413,11 +40637,9 @@ class SlopeAspectAnalysisViewModel {
40413
40637
  slopeColorAlpha: viewModel.slopeColorAlpha,
40414
40638
  colorImage: this.getImagePath(viewModel.colorImage),
40415
40639
  };
40640
+ this._showEnableLighting = this._globaOptions.viewer.scene.globe.enableLighting;
40416
40641
  this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
40417
- // this._globaOptions.viewer.scene.globe.enableLighting = true;
40418
- this._globaOptions.viewer.scene.logarithmicDepthBuffer = true;
40419
- this._globaOptions.viewer.scene.pickTranslucentDepth = true;
40420
- this._globaOptions.viewer.scene._environmentState.renderTranslucentDepthForPick = true;
40642
+ this._globaOptions.viewer.scene.globe.enableLighting = true;
40421
40643
 
40422
40644
  this._globaOptions._drawManager = scenceView._drawManager;
40423
40645
  // 坡度对象
@@ -40448,6 +40670,9 @@ class SlopeAspectAnalysisViewModel {
40448
40670
  }
40449
40671
  return imagePath;
40450
40672
  }
40673
+ setCursor(style) {
40674
+ this._globaOptions.viewer.canvas.style.cursor = style;
40675
+ }
40451
40676
  // 开始分析
40452
40677
  start() {
40453
40678
  var that = this;
@@ -40455,7 +40680,9 @@ class SlopeAspectAnalysisViewModel {
40455
40680
  if (this._globaOptions.viewModel.viewer.terrainProvider.availability) {
40456
40681
  if (this._globaOptions.viewModel.viewer.terrainProvider && !this._globaOptions.viewModel.viewer.terrainProvider._heightmapStructure) {
40457
40682
  if (this._globaOptions && this._globaOptions.analysisMethod == 2) {
40458
- if(this._calculationSlopeAspect){
40683
+ this._globaOptions.viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
40684
+ this.setCursor("crosshair");
40685
+ if(this._calculationSlopeAspect) {
40459
40686
  this._calculationSlopeAspect?.startCalculation();
40460
40687
  }else {
40461
40688
  this._calculationSlopeAspect = new Cesium.Kq3dCalculationSlopeAspect(this._globaOptions.calculationOption);
@@ -40662,6 +40889,7 @@ class SlopeAspectAnalysisViewModel {
40662
40889
  this._globaOptions.calculationOption["controlPointBorder"] = newValue;
40663
40890
  }
40664
40891
  stopCalculation(){
40892
+ this.setCursor("default");
40665
40893
  this._calculationSlopeAspect?.stopCalculation?.();
40666
40894
  }
40667
40895
  removeCalculation() {
@@ -40683,9 +40911,10 @@ class SlopeAspectAnalysisViewModel {
40683
40911
  }
40684
40912
  // 销毁
40685
40913
  destroy() {
40686
- this._slopeAnalysis && this._slopeAnalysis.destroy();
40914
+ that._globaOptions.viewer.scene.globe.enableLighting = this._showEnableLighting;
40915
+ this._slopeAnalysis?.destroy?.();
40687
40916
  this._slopeAnalysis = null;
40688
- this._aspectAnalysis && this._aspectAnalysis.clear();
40917
+ this._aspectAnalysis?.destroy?.() || this._aspectAnalysis?.clear?.();
40689
40918
  this._aspectAnalysis = null;
40690
40919
  this.destroyCalculation();
40691
40920
  }
@@ -41994,28 +42223,31 @@ class IsolineAnalysisViewModel {
41994
42223
 
41995
42224
  //开始分析
41996
42225
  start() {
42226
+ this.remove();
41997
42227
  var that = this;
41998
42228
  // 判断是否添加了地形
41999
42229
  if (that._options.viewer.terrainProvider.availability) {
42000
- that._drawManager?.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
42001
- if (!shape.groupName || shape.groupName !== "IsolineAnalysisDraw") return;
42002
- if (shape) {
42003
- that._options.positions = shape._controlPoints;
42004
- switch (that._options.filltype) {
42005
- case 0:
42006
- that._options.type = Cesium.Kq3dContourAnalysisType.LINE;
42007
- break;
42008
- case 1:
42009
- that._options.type = Cesium.Kq3dContourAnalysisType.SURFACE;
42010
- break;
42011
- case 2:
42012
- that._options.type = Cesium.Kq3dContourAnalysisType.SUFACE_LINE;
42013
- break;
42230
+ if(that._drawManager) {
42231
+ that._drawManager?.startDraw("polygon", { clampToGround: true }, (feature, { shape }) => {
42232
+ if (!shape.groupName || shape.groupName !== "IsolineAnalysisDraw") return;
42233
+ if (shape) {
42234
+ that._options.positions = shape._controlPoints;
42235
+ switch (that._options.filltype) {
42236
+ case 0:
42237
+ that._options.type = Cesium.Kq3dContourAnalysisType.LINE;
42238
+ break;
42239
+ case 1:
42240
+ that._options.type = Cesium.Kq3dContourAnalysisType.SURFACE;
42241
+ break;
42242
+ case 2:
42243
+ that._options.type = Cesium.Kq3dContourAnalysisType.SUFACE_LINE;
42244
+ break;
42245
+ }
42246
+ that._elevation = new Cesium.Kq3dContourAnalysis(that._options);
42014
42247
  }
42015
- that._elevation = new Cesium.Kq3dContourAnalysis(that._options);
42016
- }
42017
- that._drawManager.clearDrawGroup("IsolineAnalysisDraw");
42018
- }, "IsolineAnalysisDraw");
42248
+ that._drawManager.clearDrawGroup("IsolineAnalysisDraw");
42249
+ }, "IsolineAnalysisDraw");
42250
+ }
42019
42251
  } else {
42020
42252
  message({
42021
42253
  message: this._language["terrainAnalysisTips"],
@@ -42023,18 +42255,21 @@ class IsolineAnalysisViewModel {
42023
42255
  });
42024
42256
  }
42025
42257
  }
42026
-
42258
+ // 清除数据
42259
+ remove() {
42260
+ this._elevation && this._elevation.destroy();
42261
+ this._elevation = null;
42262
+ }
42027
42263
  //清除全部结果
42028
42264
  clear() {
42029
- this._drawManager && this._drawManager.stopDraw();
42265
+ this._drawManager?.stopDraw();
42266
+ this._drawManager?.clearDrawGroup("IsolineAnalysisDraw");
42030
42267
  this._elevation && this._elevation.destroy();
42031
42268
  this._elevation = null;
42032
42269
  }
42033
42270
  //销毁
42034
42271
  destroy() {
42035
- this._drawManager && this._drawManager.stopDraw();
42036
- this._elevation && this._elevation.destroy();
42037
- this._elevation = null;
42272
+ this.clear();
42038
42273
  }
42039
42274
  //设置首曲线显隐
42040
42275
  setElevationMarking(show) {
@@ -44247,6 +44482,8 @@ class BoxClipViewModel {
44247
44482
  clear() {
44248
44483
  if (this._boxclipAnalysis) this._boxclipAnalysis.boxEnable = false;
44249
44484
  this._boxclipAnalysis && this._boxclipAnalysis.remove();
44485
+ this._drawManager?.stopDraw();
44486
+ this._drawManager?.clearDrawGroup("BoxClipDraw");
44250
44487
  // this._boxclipAnalysis = null;
44251
44488
  }
44252
44489
 
@@ -45186,7 +45423,8 @@ class PlaneClipViewModel {
45186
45423
  }
45187
45424
  }
45188
45425
  if (flag) {
45189
- if (this._drawManager) this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
45426
+ if (!this._drawManager) return;
45427
+ this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
45190
45428
  if (!shape.groupName || shape.groupName !== "PlaneClipDraw") return;
45191
45429
  if (shape) {
45192
45430
  that._options.position = shape.position;
@@ -48019,12 +48257,13 @@ class ParticleEffectViewModel {
48019
48257
  _options = null; //粒子特效存储参数对象
48020
48258
  _fireImage = const_image_.FIRE_URL; //火焰图片url地址
48021
48259
  _smokeImage = const_image_.SMOKE_URL; //烟雾图片url地址
48022
-
48260
+ _language = null;
48023
48261
  constructor(scenceView) {
48024
48262
  scenceView._viewer.clock.shouldAnimate = true;
48025
48263
  scenceView._viewer.scene.globe.depthTestAgainstTerrain = true;
48026
48264
  this._scene = scenceView._viewer.scene;
48027
48265
  this._drawManager = scenceView._drawManager;
48266
+ this._language = scenceView._language;
48028
48267
  _gravityScratch = new Cesium.Cartesian3();
48029
48268
  }
48030
48269
 
@@ -48939,7 +49178,7 @@ class WeatherEffectViewModel {
48939
49178
  _options = null; //天气特效存储参数对象
48940
49179
  _rainImage = const_image_.RAIN_URL; //雨图片url地址
48941
49180
  _snowImage = const_image_.SNOW_URL; //雪图片url地址
48942
-
49181
+ _language = null;
48943
49182
  constructor(scenceView) {
48944
49183
  scenceView._viewer.clock.shouldAnimate = true;
48945
49184
  scenceView._viewer.clock.multiplier = 0.6;
@@ -48947,6 +49186,7 @@ class WeatherEffectViewModel {
48947
49186
  this._scene = scenceView._viewer.scene;
48948
49187
  this._drawManager = scenceView._drawManager;
48949
49188
  WeatherEffectViewModel_gravityScratch = new Cesium.Cartesian3();
49189
+ this._language = scenceView._language;
48950
49190
  }
48951
49191
 
48952
49192
  applyGravity(particle, dt) {
@@ -48969,7 +49209,7 @@ class WeatherEffectViewModel {
48969
49209
  }
48970
49210
  if (options.gravity) this.setGravity(options.gravity);
48971
49211
  this._options = options;
48972
- this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
49212
+ this._drawManager?.startDraw("marker", { image: null }, (feature, { shape }) => {
48973
49213
  if (!shape.groupName || shape.groupName !== "WeatherEffectDraw") return;
48974
49214
  if (shape && shape.type === "marker") {
48975
49215
  let position = shape.position;
@@ -49005,14 +49245,14 @@ class WeatherEffectViewModel {
49005
49245
  }
49006
49246
  }
49007
49247
  }
49008
- that._drawManager && that._drawManager.clearDrawGroup("WeatherEffectDraw");
49248
+ that._drawManager?.clearDrawGroup("WeatherEffectDraw");
49009
49249
  }, "WeatherEffectDraw");
49010
49250
  }
49011
49251
 
49012
49252
  //清除天气特效
49013
49253
  clear() {
49014
- this._drawManager.stopDraw();
49015
- this._drawManager && this._drawManager.clearDrawGroup("WeatherEffectDraw");
49254
+ this._drawManager?.stopDraw();
49255
+ this._drawManager?.clearDrawGroup("WeatherEffectDraw");
49016
49256
  this._particleSystem && this._scene.primitives.remove(this._particleSystem);
49017
49257
  this._particleSystem = null;
49018
49258
  }
@@ -56078,11 +56318,13 @@ class LightViewModel {
56078
56318
  _drawManager = null; //绘制管理对象
56079
56319
  _options = null; //灯光存储参数对象
56080
56320
  _lightList = []; //灯光对象集合
56321
+ _language = null;
56081
56322
 
56082
56323
  constructor(scenceView, options) {
56083
56324
  this._options = options;
56084
56325
  this._viewer = scenceView._viewer;
56085
56326
  this._drawManager = scenceView._drawManager;
56327
+ this._language = scenceView._language;
56086
56328
  this._drawHandler = this._drawManager._drawHandler.drawHandler;
56087
56329
  this._lightModelDs = new Cesium.CustomDataSource("LightModel");
56088
56330
 
@@ -56105,6 +56347,7 @@ class LightViewModel {
56105
56347
  addLight() {
56106
56348
  var that = this;
56107
56349
  if (this._options) {
56350
+ if(!this._drawManager) return;
56108
56351
  if (this._options.mode == "point" || this._options.mode == "spot") {
56109
56352
  this._drawManager.startDraw("marker", { image: null }, (feature, { shape }) => {
56110
56353
  if (!shape.groupName || shape.groupName !== "LightDraw") return;
@@ -56121,7 +56364,9 @@ class LightViewModel {
56121
56364
  that._drawManager && that._drawManager.clearDrawGroup("LightDraw");
56122
56365
  }, "LightDraw");
56123
56366
  } else if (this._options.mode == "parallel") {
56124
- this._drawManager.startDraw("polyline", { clampToGround: false }, null, "LightDraw");
56367
+ this._drawManager.startDraw("polyline", { clampToGround: false }, (feature, { shape }) => {
56368
+ if (!shape.groupName || shape.groupName !== "parallelLightDraw") return;
56369
+ }, "parallelLightDraw");
56125
56370
  }
56126
56371
  }
56127
56372
  }
@@ -56227,6 +56472,7 @@ class LightViewModel {
56227
56472
  clear() {
56228
56473
  this._drawManager.stopDraw();
56229
56474
  this._drawManager && this._drawManager.clearDrawGroup("LightDraw");
56475
+ this._drawManager && this._drawManager.clearDrawGroup("parallelLightDraw");
56230
56476
  this._lightModelDs.entities.removeAll();
56231
56477
  this.clearLights();
56232
56478
  this._light = null;
@@ -56890,6 +57136,16 @@ class GeologicalBodyAnalysisViewModel {
56890
57136
  this._viewer = scenceView._viewer;
56891
57137
  this.callbackParams = callbackParams;
56892
57138
  this._measureHandler = new Cesium.Kq3dMeasureHandler(scenceView._viewer);
57139
+ if(scenceView._props.showDrawTipsStyle){
57140
+ this._measureHandler.showDrawTips = scenceView._props.showDrawTipsStyle;
57141
+ this._measureHandler.drawTipsStyle = {
57142
+ ...scenceView._drawTipsStyle,
57143
+ ...{
57144
+ beforeDrawText: this._language?.beforeDrawText,
57145
+ duringDrawText: this._language?.duringDrawText
57146
+ }
57147
+ }
57148
+ }
56893
57149
  this._measureHandler.measureEvent.addEventListener(function (result) {
56894
57150
  if(result.measureResult.labels) result.measureResult.labels.show = false;
56895
57151
  });
@@ -58691,9 +58947,14 @@ function getMapInfoByKqService(props, cb, defaultShowLayerNames, isShowAllLayers
58691
58947
  function handleMapCrs(webMapInfo, useFullExtent) {
58692
58948
  let { spatialReference, rect, bounds } = webMapInfo;
58693
58949
 
58950
+ let crsName = spatialReference.epsg;
58951
+ if (!isNaN(spatialReference.epsg)) {
58952
+ crsName = "EPSG:" + spatialReference.epsg;
58953
+ }
58954
+
58694
58955
  // leaflet除了自带的几个空间参考 其他都得使用proj4声明
58695
58956
  if (!(spatialReference.epsg === "4326" || spatialReference.epsg === "3857")) {
58696
- window.proj4.defs("EPSG:" + spatialReference.epsg, spatialReference.proj4);
58957
+ window.proj4.defs(crsName, spatialReference.proj4);
58697
58958
  }
58698
58959
 
58699
58960
  let minx = bounds ? bounds[0][0] : rect[0],
@@ -58731,7 +58992,7 @@ function handleMapCrs(webMapInfo, useFullExtent) {
58731
58992
 
58732
58993
  let mapBounds = window.L.bounds([minx, miny], [maxx, maxy]);
58733
58994
 
58734
- return new window.L.Proj.CRS("EPSG:" + spatialReference.epsg, {
58995
+ return new window.L.Proj.CRS(crsName, {
58735
58996
  origin: webMapInfo.origin,
58736
58997
  resolutions: webMapInfo.resolutions,
58737
58998
  bounds: mapBounds,
@@ -58927,11 +59188,11 @@ function resetWebMapInfo(webMapInfo, cb, defaultShowLayerNames, isShowAllLayers)
58927
59188
  layers_old[m].guid = "custom" + "@@@" + m;
58928
59189
  }
58929
59190
 
58930
- if(layers_old[m].layers){
59191
+ if (layers_old[m].layers) {
58931
59192
  resetGuid(layers_old[m].layers);
58932
59193
  }
58933
59194
 
58934
- if(layers_old[m].restLayers){
59195
+ if (layers_old[m].restLayers) {
58935
59196
  resetGuid(layers_old[m].restLayers);
58936
59197
  }
58937
59198
  }
@@ -85709,7 +85970,7 @@ SceneApp.install = (Vue, opts) => {
85709
85970
 
85710
85971
 
85711
85972
  const webglComponents = {
85712
- KqSceneView: SceneView,
85973
+ KqSceneView: sceneview_SceneView,
85713
85974
  Kq3dMeasure: measure_Measure,
85714
85975
  Kq3dFlight: flight_Flight,
85715
85976
  Kq3dGPUSpatialQuery: gpuspatialquery_GPUSpatialQuery,