@kq_npm/client3d_webgl_vue 0.4.0-beta → 0.4.2-beta

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
@@ -453,8 +453,12 @@ __webpack_require__.d(__webpack_exports__, {
453
453
  "Kq3dBoxClipViewModel": function() { return /* reexport */ BoxClipViewModel; },
454
454
  "Kq3dCompareMap": function() { return /* reexport */ CompareMap; },
455
455
  "Kq3dCompareMapViewModel": function() { return /* reexport */ CompareMapViewModel; },
456
+ "Kq3dCompass": function() { return /* reexport */ Compass; },
457
+ "Kq3dCompassViewModel": function() { return /* reexport */ CompassViewModel; },
456
458
  "Kq3dExcavateFillAnalysis": function() { return /* reexport */ ExcavateFillAnalysis; },
457
459
  "Kq3dExcavateFillAnalysisViewModel": function() { return /* reexport */ ExcavateFillAnalysisViewModel; },
460
+ "Kq3dFixedZoom": function() { return /* reexport */ FixedZoom; },
461
+ "Kq3dFixedZoomViewModel": function() { return /* reexport */ FixedZoomViewModel; },
458
462
  "Kq3dFlight": function() { return /* reexport */ Flight; },
459
463
  "Kq3dFlightViewModel": function() { return /* reexport */ FlightViewModel; },
460
464
  "Kq3dFloodAnalysis": function() { return /* reexport */ FloodAnalysis; },
@@ -475,6 +479,8 @@ __webpack_require__.d(__webpack_exports__, {
475
479
  "Kq3dPlaneClipViewModel": function() { return /* reexport */ PlaneClipViewModel; },
476
480
  "Kq3dProfileAnalysis": function() { return /* reexport */ ProfileAnalysis; },
477
481
  "Kq3dProfileAnalysisViewModel": function() { return /* reexport */ ProfileAnalysisViewModel; },
482
+ "Kq3dResetView": function() { return /* reexport */ ResetView; },
483
+ "Kq3dResetViewViewModel": function() { return /* reexport */ ResetViewViewModel; },
478
484
  "Kq3dRoller": function() { return /* reexport */ Roller; },
479
485
  "Kq3dRollerViewModel": function() { return /* reexport */ RollerViewModel; },
480
486
  "Kq3dScreenShot": function() { return /* reexport */ Screenshot; },
@@ -496,16 +502,14 @@ __webpack_require__.d(__webpack_exports__, {
496
502
  "KqScenceView": function() { return /* reexport */ ScenceView; },
497
503
  "KqScenceViewViewModel": function() { return /* reexport */ ScenceViewViewModel; },
498
504
  "default": function() { return /* binding */ webgl; },
505
+ "kq3dUnderground": function() { return /* reexport */ Underground; },
506
+ "kq3dUndergroundViewModel": function() { return /* reexport */ UndergroundViewModel; },
499
507
  "kqAddData": function() { return /* reexport */ AddData; },
500
508
  "webglComponents": function() { return /* reexport */ webglComponents; }
501
509
  });
502
510
 
503
511
  ;// CONCATENATED MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
504
512
  var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject = require("vue");
505
- ;// CONCATENATED MODULE: external "@kq_npm/client_icons_vue"
506
- var client_icons_vue_namespaceObject = require("@kq_npm/client_icons_vue");
507
- ;// CONCATENATED MODULE: external "@element-plus/icons-vue"
508
- var icons_vue_namespaceObject = require("@element-plus/icons-vue");
509
513
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
510
514
  function _defineProperty(obj, key, value) {
511
515
  if (key in obj) {
@@ -2304,138 +2308,6 @@ class ScenceViewViewModel extends (mitt_default()) {
2304
2308
  this._viewer = null;
2305
2309
  this._drawManager = null;
2306
2310
  this._layerManager = null;
2307
- } //获取相机焦点
2308
-
2309
-
2310
- getCameraFocus() {
2311
- var scene = this._viewer.scene;
2312
- var camera = scene.camera;
2313
- var rayScratch = new Cesium.Ray();
2314
- rayScratch.origin = camera.positionWC;
2315
- rayScratch.direction = camera.directionWC;
2316
- var result = new Cesium.Cartesian3();
2317
- result = scene.globe.pick(rayScratch, scene, result);
2318
-
2319
- if (result) {
2320
- result = camera.worldToCameraCoordinatesPoint(result, result);
2321
- }
2322
-
2323
- return result;
2324
- } //地图缩放
2325
-
2326
-
2327
- zoom(scale) {
2328
- var scene = this._viewer.scene;
2329
- var camera = scene.camera;
2330
- var focus = this.getCameraFocus();
2331
- var orientation;
2332
-
2333
- if (!focus) {
2334
- // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as
2335
- // the focal point.
2336
- var ray = new Cesium.Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC);
2337
- focus = Cesium.IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
2338
- orientation = {
2339
- heading: camera.heading,
2340
- pitch: camera.pitch,
2341
- roll: camera.roll
2342
- };
2343
- } else {
2344
- orientation = {
2345
- direction: camera.direction,
2346
- up: camera.up
2347
- };
2348
- }
2349
-
2350
- var cartesian3Scratch = new Cesium.Cartesian3();
2351
- var direction = Cesium.Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
2352
- var movementVector = Cesium.Cartesian3.multiplyByScalar(direction, scale, direction);
2353
- var endPosition = Cesium.Cartesian3.add(focus, movementVector, focus);
2354
- camera.flyTo({
2355
- destination: endPosition,
2356
- orientation: orientation,
2357
- duration: 0.5,
2358
- convert: false
2359
- });
2360
- } //地图放大
2361
-
2362
-
2363
- zoomIn() {
2364
- this.zoom(0.5);
2365
- } //地图缩小
2366
-
2367
-
2368
- zoomOut() {
2369
- this.zoom(2);
2370
- } //重置视角
2371
-
2372
-
2373
- resetView() {//this._viewer.camera.flyHome(1);
2374
- } //重置方向
2375
-
2376
-
2377
- resetOrientation() {
2378
- var camera = this._viewer.camera;
2379
- var scene = this._viewer.scene;
2380
- var depthTestAgainstTerrain = scene.globe.depthTestAgainstTerrain;
2381
-
2382
- if (!depthTestAgainstTerrain) {
2383
- scene.globe.depthTestAgainstTerrain = true;
2384
- }
2385
-
2386
- var canvas = scene.canvas;
2387
- var windowCenter = new Cesium.Cartesian2(canvas.clientWidth / 2, canvas.clientHeight / 2);
2388
- setTimeout(() => {
2389
- var center = scene.pickPosition(windowCenter);
2390
-
2391
- if (!center) {
2392
- center = scene.camera.pickEllipsoid(windowCenter, scene.globe.ellipsoid);
2393
- }
2394
-
2395
- scene.globe.depthTestAgainstTerrain = depthTestAgainstTerrain;
2396
- var distance = Cesium.Cartesian3.distance(center, camera.positionWC);
2397
- var heading = 6.28319;
2398
- var pitch = camera.pitch;
2399
- var hpr = new Cesium.HeadingPitchRange(heading, pitch, distance);
2400
- camera.lookAt(center, hpr);
2401
- camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
2402
- }, 300);
2403
- } //绑定指南针
2404
-
2405
-
2406
- bindCompassEvent(heading) {
2407
- var camera = this._viewer.camera;
2408
- this._removeEventListener = camera.changed.addEventListener(function () {
2409
- heading.value = camera.heading;
2410
- });
2411
- } //获取三维视角
2412
-
2413
-
2414
- getViewPosition() {
2415
- var camera = this._viewer.camera;
2416
- var position = {
2417
- x: camera.position.x,
2418
- y: camera.position.y,
2419
- z: camera.position.z
2420
- };
2421
- return {
2422
- position: position,
2423
- heading: camera.heading,
2424
- pitch: camera.pitch,
2425
- roll: camera.roll
2426
- };
2427
- } //设置三维视角
2428
-
2429
-
2430
- setViewPosition(view) {
2431
- this._viewer.camera.flyTo({
2432
- destination: view.position,
2433
- orientation: {
2434
- heading: view.heading,
2435
- pitch: view.pitch,
2436
- roll: view.roll
2437
- }
2438
- });
2439
2311
  } //创建底图
2440
2312
 
2441
2313
 
@@ -2578,11 +2450,6 @@ const _hoisted_1 = {
2578
2450
  oncontextmenu: "return false;"
2579
2451
  };
2580
2452
  const _hoisted_2 = ["id"];
2581
- const _hoisted_3 = {
2582
- class: "view-left-tools"
2583
- };
2584
-
2585
-
2586
2453
 
2587
2454
 
2588
2455
  const __default__ = {
@@ -2617,17 +2484,11 @@ const __default__ = {
2617
2484
  defaultShowLayerNames: []
2618
2485
  }
2619
2486
  },
2620
- showToolButtons: {
2621
- type: Boolean,
2622
- default: true
2623
- },
2624
2487
  // ScenceView初始化的参数对象,包含初始化范围和layer信息。
2625
2488
  scenceInfo: Object
2626
2489
  },
2627
2490
 
2628
- setup(__props, {
2629
- expose
2630
- }) {
2491
+ setup(__props) {
2631
2492
  const props = __props;
2632
2493
  const {
2633
2494
  proxy
@@ -2640,123 +2501,472 @@ const __default__ = {
2640
2501
  * showToolButtons - 是否显示左侧工具栏按钮
2641
2502
  */
2642
2503
 
2643
- let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
2644
- let viewModel = null;
2645
- let heading = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(0);
2646
- let removeEventListener = null;
2647
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
2648
- //设置语言
2649
- let _lang = proxy.$i18n.locale;
2650
- let _language = proxy.$i18n.messages[_lang]['webgl'];
2651
- language.value = _language; //初始化逻辑类
2504
+ let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
2505
+ let viewModel = null;
2506
+ let removeEventListener = null;
2507
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
2508
+ //设置语言
2509
+ let _lang = proxy.$i18n.locale;
2510
+ let _language = proxy.$i18n.messages[_lang]['webgl'];
2511
+ language.value = _language; //初始化逻辑类
2512
+
2513
+ viewModel = new ScenceViewViewModel(props, _language);
2514
+ viewModel.initViewer();
2515
+ }); // 销毁
2516
+
2517
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
2518
+ viewModel && viewModel.destroy();
2519
+ });
2520
+ return (_ctx, _cache) => {
2521
+ return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.renderSlot)(_ctx.$slots, "default"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
2522
+ id: props.target,
2523
+ class: "view-container"
2524
+ }, null, 8
2525
+ /* PROPS */
2526
+ , _hoisted_2)]);
2527
+ };
2528
+ }
2529
+
2530
+ }));
2531
+ ;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceView.vue?vue&type=script&setup=true&lang=js
2532
+
2533
+ ;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceView.vue
2534
+
2535
+
2536
+
2537
+ const __exports__ = ScenceViewvue_type_script_setup_true_lang_js;
2538
+
2539
+ /* harmony default export */ var ScenceView = (__exports__);
2540
+ ;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/init.js"
2541
+ var init_js_namespaceObject = require("@kq_npm/client_common_vue/init.js");
2542
+ var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_namespaceObject);
2543
+ ;// CONCATENATED MODULE: ./src/webgl/scenceview/index.js
2544
+
2545
+
2546
+
2547
+
2548
+ ScenceView.install = (Vue, opts) => {
2549
+ init_js_default()(Vue, opts);
2550
+ Vue.component(ScenceView.name, ScenceView);
2551
+ };
2552
+
2553
+
2554
+ ;// CONCATENATED MODULE: external "@element-plus/icons-vue"
2555
+ var icons_vue_namespaceObject = require("@element-plus/icons-vue");
2556
+ ;// CONCATENATED MODULE: ./src/webgl/fixedzoom/FixedZoomViewModel.js
2557
+
2558
+ // 三维固定缩放逻辑
2559
+ class FixedZoomViewModel {
2560
+ constructor(viewer) {
2561
+ _defineProperty(this, "_viewer", null);
2562
+
2563
+ this._viewer = viewer;
2564
+ } //获取相机焦点
2565
+
2566
+
2567
+ getCameraFocus() {
2568
+ if (!this._viewer) return;
2569
+ var scene = this._viewer.scene;
2570
+ var camera = scene.camera;
2571
+ var rayScratch = new Cesium.Ray();
2572
+ rayScratch.origin = camera.positionWC;
2573
+ rayScratch.direction = camera.directionWC;
2574
+ var result = new Cesium.Cartesian3();
2575
+ result = scene.globe.pick(rayScratch, scene, result);
2576
+
2577
+ if (result) {
2578
+ result = camera.worldToCameraCoordinatesPoint(result, result);
2579
+ }
2580
+
2581
+ return result;
2582
+ } //地图缩放
2583
+
2584
+
2585
+ zoom(scale) {
2586
+ if (!this._viewer) return;
2587
+ var scene = this._viewer.scene;
2588
+ var camera = scene.camera;
2589
+ var focus = this.getCameraFocus();
2590
+ var orientation;
2591
+
2592
+ if (!focus) {
2593
+ // Camera direction is not pointing at the globe, so use the ellipsoid horizon point as
2594
+ // the focal point.
2595
+ var ray = new Cesium.Ray(camera.worldToCameraCoordinatesPoint(scene.globe.ellipsoid.cartographicToCartesian(camera.positionCartographic)), camera.directionWC);
2596
+ focus = Cesium.IntersectionTests.grazingAltitudeLocation(ray, scene.globe.ellipsoid);
2597
+ orientation = {
2598
+ heading: camera.heading,
2599
+ pitch: camera.pitch,
2600
+ roll: camera.roll
2601
+ };
2602
+ } else {
2603
+ orientation = {
2604
+ direction: camera.direction,
2605
+ up: camera.up
2606
+ };
2607
+ }
2608
+
2609
+ var cartesian3Scratch = new Cesium.Cartesian3();
2610
+ var direction = Cesium.Cartesian3.subtract(camera.position, focus, cartesian3Scratch);
2611
+ var movementVector = Cesium.Cartesian3.multiplyByScalar(direction, scale, direction);
2612
+ var endPosition = Cesium.Cartesian3.add(focus, movementVector, focus);
2613
+ camera.flyTo({
2614
+ destination: endPosition,
2615
+ orientation: orientation,
2616
+ duration: 0.5,
2617
+ convert: false
2618
+ });
2619
+ }
2620
+
2621
+ }
2622
+ ;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
2623
+ var gis_utils_namespaceObject = require("@kq_npm/client_common_vue/_utils/gis-utils");
2624
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/fixedzoom/FixedZoom.vue?vue&type=script&setup=true&lang=js
2625
+
2626
+
2627
+
2628
+
2629
+ // 获取组件传参
2630
+
2631
+ const FixedZoomvue_type_script_setup_true_lang_js_default_ = {
2632
+ name: "Kq3dFixedZoom"
2633
+ };
2634
+ /* harmony default export */ var FixedZoomvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(FixedZoomvue_type_script_setup_true_lang_js_default_, {
2635
+ props: {
2636
+ mapTarget: String,
2637
+ // 切换按钮是固定放大还是固定缩小,值:zoomIn 或 zoomOut
2638
+ isZoomInOrOut: {
2639
+ type: Boolean,
2640
+ default: true
2641
+ },
2642
+ // 按钮图标大小
2643
+ iconSize: {
2644
+ type: Number,
2645
+ default: 16
2646
+ },
2647
+ // 按钮大小
2648
+ buttonSize: {
2649
+ type: String,
2650
+ default: "32px"
2651
+ }
2652
+ },
2653
+
2654
+ setup(__props) {
2655
+ const props = __props;
2656
+ let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
2657
+ let viewModel = null;
2658
+ let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null);
2659
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
2660
+ gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
2661
+ if (scenceView) {
2662
+ language.value = scenceView._language;
2663
+ viewModel = new FixedZoomViewModel(scenceView._viewer);
2664
+ }
2665
+ });
2666
+ }); // 按钮点击事件
2667
+
2668
+ function btnClick() {
2669
+ btn.value.$el.blur();
2670
+ viewModel && viewModel.zoom(props.isZoomInOrOut ? 0.5 : 2);
2671
+ }
2672
+
2673
+ return (_ctx, _cache) => {
2674
+ const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
2675
+
2676
+ const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
2677
+
2678
+ return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_button, {
2679
+ title: __props.isZoomInOrOut ? (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomIn : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomOut,
2680
+ ref_key: "btn",
2681
+ ref: btn,
2682
+ onClick: btnClick,
2683
+ style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('width:' + __props.buttonSize)
2684
+ }, {
2685
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [__props.isZoomInOrOut ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_icon, {
2686
+ key: 0,
2687
+ size: __props.iconSize
2688
+ }, {
2689
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Plus))]),
2690
+ _: 1
2691
+ /* STABLE */
2692
+
2693
+ }, 8
2694
+ /* PROPS */
2695
+ , ["size"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true), !__props.isZoomInOrOut ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_icon, {
2696
+ key: 1,
2697
+ size: __props.iconSize
2698
+ }, {
2699
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Minus))]),
2700
+ _: 1
2701
+ /* STABLE */
2702
+
2703
+ }, 8
2704
+ /* PROPS */
2705
+ , ["size"])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createCommentVNode)("v-if", true)]),
2706
+ _: 1
2707
+ /* STABLE */
2708
+
2709
+ }, 8
2710
+ /* PROPS */
2711
+ , ["title", "style"]);
2712
+ };
2713
+ }
2714
+
2715
+ }));
2716
+ ;// CONCATENATED MODULE: ./src/webgl/fixedzoom/FixedZoom.vue?vue&type=script&setup=true&lang=js
2717
+
2718
+ ;// CONCATENATED MODULE: ./src/webgl/fixedzoom/FixedZoom.vue
2719
+
2720
+
2721
+
2722
+ const FixedZoom_exports_ = FixedZoomvue_type_script_setup_true_lang_js;
2723
+
2724
+ /* harmony default export */ var FixedZoom = (FixedZoom_exports_);
2725
+ ;// CONCATENATED MODULE: ./src/webgl/fixedzoom/index.js
2726
+
2727
+
2728
+
2729
+
2730
+ FixedZoom.install = (Vue, opts) => {
2731
+ init_js_default()(Vue, opts);
2732
+ Vue.component(FixedZoom.name, FixedZoom);
2733
+ };
2734
+
2735
+
2736
+ ;// CONCATENATED MODULE: ./src/webgl/resetview/ResetViewViewModel.js
2737
+
2738
+ // 重置视图
2739
+ class ResetViewViewModel {
2740
+ constructor(viewer) {
2741
+ _defineProperty(this, "_viewer", null);
2742
+
2743
+ this._viewer = viewer;
2744
+ } //重置视角
2745
+
2746
+
2747
+ resetView() {
2748
+ this._viewer.camera.flyHome(1);
2749
+ }
2750
+
2751
+ }
2752
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/resetview/ResetView.vue?vue&type=script&setup=true&lang=js
2753
+
2754
+
2755
+
2756
+
2757
+ // 获取组件传参
2758
+
2759
+ const ResetViewvue_type_script_setup_true_lang_js_default_ = {
2760
+ name: "Kq3dResetView"
2761
+ };
2762
+ /* harmony default export */ var ResetViewvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(ResetViewvue_type_script_setup_true_lang_js_default_, {
2763
+ props: {
2764
+ mapTarget: String,
2765
+ // 按钮图标大小
2766
+ iconSize: {
2767
+ type: Number,
2768
+ default: 16
2769
+ },
2770
+ // 按钮大小
2771
+ buttonSize: {
2772
+ type: String,
2773
+ default: "32px"
2774
+ }
2775
+ },
2776
+
2777
+ setup(__props) {
2778
+ const props = __props;
2779
+ let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
2780
+ let viewModel = null;
2781
+ let btn = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(null);
2782
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
2783
+ gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
2784
+ if (scenceView) {
2785
+ language.value = scenceView._language;
2786
+ viewModel = new ResetViewViewModel(scenceView._viewer);
2787
+ }
2788
+ });
2789
+ }); // 按钮点击事件
2790
+
2791
+ function btnClick(e) {
2792
+ btn.value.$el.blur();
2793
+ viewModel && viewModel.resetView();
2794
+ }
2795
+
2796
+ return (_ctx, _cache) => {
2797
+ const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
2798
+
2799
+ const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
2800
+
2801
+ return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_button, {
2802
+ ref_key: "btn",
2803
+ ref: btn,
2804
+ onClick: btnClick,
2805
+ title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetView,
2806
+ style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('width:' + __props.buttonSize)
2807
+ }, {
2808
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
2809
+ size: __props.iconSize
2810
+ }, {
2811
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.RefreshLeft))]),
2812
+ _: 1
2813
+ /* STABLE */
2814
+
2815
+ }, 8
2816
+ /* PROPS */
2817
+ , ["size"])]),
2818
+ _: 1
2819
+ /* STABLE */
2820
+
2821
+ }, 8
2822
+ /* PROPS */
2823
+ , ["title", "style"]);
2824
+ };
2825
+ }
2826
+
2827
+ }));
2828
+ ;// CONCATENATED MODULE: ./src/webgl/resetview/ResetView.vue?vue&type=script&setup=true&lang=js
2829
+
2830
+ ;// CONCATENATED MODULE: ./src/webgl/resetview/ResetView.vue
2831
+
2832
+
2833
+
2834
+ const ResetView_exports_ = ResetViewvue_type_script_setup_true_lang_js;
2835
+
2836
+ /* harmony default export */ var ResetView = (ResetView_exports_);
2837
+ ;// CONCATENATED MODULE: ./src/webgl/resetview/index.js
2838
+
2839
+
2840
+
2841
+
2842
+ ResetView.install = (Vue, opts) => {
2843
+ init_js_default()(Vue, opts);
2844
+ Vue.component(ResetView.name, ResetView);
2845
+ };
2846
+
2847
+
2848
+ ;// CONCATENATED MODULE: external "@kq_npm/client_icons_vue"
2849
+ var client_icons_vue_namespaceObject = require("@kq_npm/client_icons_vue");
2850
+ ;// CONCATENATED MODULE: ./src/webgl/compass/CompassViewModel.js
2851
+
2852
+ // 重置视图
2853
+ class CompassViewModel {
2854
+ constructor(viewer) {
2855
+ _defineProperty(this, "_viewer", null);
2856
+
2857
+ this._viewer = viewer;
2858
+ } //重置方向
2859
+
2860
+
2861
+ resetOrientation() {
2862
+ var camera = this._viewer.camera;
2863
+ var scene = this._viewer.scene;
2864
+ var depthTestAgainstTerrain = scene.globe.depthTestAgainstTerrain;
2865
+
2866
+ if (!depthTestAgainstTerrain) {
2867
+ scene.globe.depthTestAgainstTerrain = true;
2868
+ }
2652
2869
 
2653
- viewModel = new ScenceViewViewModel(props, _language);
2654
- viewModel.initViewer();
2870
+ var canvas = scene.canvas;
2871
+ var windowCenter = new Cesium.Cartesian2(canvas.clientWidth / 2, canvas.clientHeight / 2);
2872
+ setTimeout(() => {
2873
+ var center = scene.pickPosition(windowCenter);
2655
2874
 
2656
- if (props.showToolButtons) {
2657
- //绑定指南针事件
2658
- viewModel.bindCompassEvent(heading);
2875
+ if (!center) {
2876
+ center = scene.camera.pickEllipsoid(windowCenter, scene.globe.ellipsoid);
2659
2877
  }
2660
- }); // 销毁
2661
2878
 
2662
- (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
2663
- viewModel && viewModel.destroy();
2664
- }); //地图放大
2879
+ scene.globe.depthTestAgainstTerrain = depthTestAgainstTerrain;
2880
+ var distance = Cesium.Cartesian3.distance(center, camera.positionWC);
2881
+ var heading = 6.28319;
2882
+ var pitch = camera.pitch;
2883
+ var hpr = new Cesium.HeadingPitchRange(heading, pitch, distance);
2884
+ camera.lookAt(center, hpr);
2885
+ camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
2886
+ }, 300);
2887
+ } //绑定指南针
2665
2888
 
2666
- function zoomIn() {
2667
- viewModel && viewModel.zoomIn();
2668
- } //地图缩小
2669
2889
 
2890
+ bindCompassEvent(heading) {
2891
+ var camera = this._viewer.camera;
2892
+ this._removeEventListener = camera.changed.addEventListener(function () {
2893
+ heading.value = camera.heading;
2894
+ });
2895
+ } // 注销事件
2670
2896
 
2671
- function zoomOut() {
2672
- viewModel && viewModel.zoomOut();
2673
- } //重置视角
2674
2897
 
2898
+ destroy() {
2899
+ if (this._removeEventListener) {
2900
+ this._removeEventListener();
2675
2901
 
2676
- function resetView() {
2677
- viewModel && viewModel.resetView();
2678
- } //重置方向
2902
+ this._removeEventListener = null;
2903
+ }
2679
2904
 
2905
+ this._viewer = null;
2906
+ }
2680
2907
 
2681
- function resetOrientation() {
2682
- viewModel && viewModel.resetOrientation();
2683
- }
2908
+ }
2909
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/compass/Compass.vue?vue&type=script&setup=true&lang=js
2684
2910
 
2685
- expose({
2686
- zoomIn,
2687
- zoomOut,
2688
- resetView,
2689
- resetOrientation
2690
- });
2691
- return (_ctx, _cache) => {
2692
- const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
2693
2911
 
2694
- const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
2695
2912
 
2696
- return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("div", _hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.renderSlot)(_ctx.$slots, "default"), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
2697
- id: props.target,
2698
- class: "view-container"
2699
- }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withDirectives)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", _hoisted_3, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
2700
- onClick: zoomIn,
2701
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomIn
2702
- }, {
2703
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
2704
- size: 16
2705
- }, {
2706
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Plus))]),
2707
- _: 1
2708
- /* STABLE */
2709
2913
 
2710
- })]),
2711
- _: 1
2712
- /* STABLE */
2914
+ // 获取组件传参
2713
2915
 
2714
- }, 8
2715
- /* PROPS */
2716
- , ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
2717
- onClick: zoomOut,
2718
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).zoomOut,
2719
- style: {
2720
- "margin-top": "0px"
2916
+ const Compassvue_type_script_setup_true_lang_js_default_ = {
2917
+ name: "Kq3dCompass"
2918
+ };
2919
+ /* harmony default export */ var Compassvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(Compassvue_type_script_setup_true_lang_js_default_, {
2920
+ props: {
2921
+ mapTarget: String,
2922
+ // 按钮图标大小
2923
+ iconSize: {
2924
+ type: Number,
2925
+ default: 16
2926
+ },
2927
+ // 按钮大小
2928
+ buttonSize: {
2929
+ type: String,
2930
+ default: "32px"
2931
+ }
2932
+ },
2933
+
2934
+ setup(__props) {
2935
+ const props = __props;
2936
+ let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
2937
+ let viewModel = null;
2938
+ let heading = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(0);
2939
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
2940
+ gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
2941
+ if (scenceView) {
2942
+ language.value = scenceView._language;
2943
+ viewModel = new CompassViewModel(scenceView._viewer); //绑定指南针事件
2944
+
2945
+ viewModel.bindCompassEvent(heading);
2721
2946
  }
2722
- }, {
2723
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
2724
- size: 16
2725
- }, {
2726
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.Minus))]),
2727
- _: 1
2728
- /* STABLE */
2947
+ });
2948
+ }); // 按钮点击事件
2729
2949
 
2730
- })]),
2731
- _: 1
2732
- /* STABLE */
2950
+ function btnClick(e) {
2951
+ viewModel && viewModel.resetOrientation();
2952
+ } // 销毁
2733
2953
 
2734
- }, 8
2735
- /* PROPS */
2736
- , ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
2737
- onClick: resetView,
2738
- title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetView
2739
- }, {
2740
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
2741
- size: 20
2742
- }, {
2743
- default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(icons_vue_namespaceObject.RefreshLeft))]),
2744
- _: 1
2745
- /* STABLE */
2746
2954
 
2747
- })]),
2748
- _: 1
2749
- /* STABLE */
2955
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
2956
+ viewModel && viewModel.destroy();
2957
+ });
2958
+ return (_ctx, _cache) => {
2959
+ const _component_kq_icon = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-icon");
2750
2960
 
2751
- }, 8
2752
- /* PROPS */
2753
- , ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_button, {
2754
- onClick: resetOrientation,
2961
+ const _component_kq_button = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-button");
2962
+
2963
+ return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createBlock)(_component_kq_button, {
2964
+ onClick: btnClick,
2755
2965
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(language).resetOrientation,
2756
- class: "compass"
2966
+ style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('clip-path: circle(50%);width:' + __props.buttonSize)
2757
2967
  }, {
2758
2968
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_icon, {
2759
- size: 20,
2969
+ size: __props.iconSize,
2760
2970
  style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('transform: rotate(-' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(heading) + 'rad);-webkit-transform: rotate(-' + (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(heading) + 'rad)')
2761
2971
  }, {
2762
2972
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(client_icons_vue_namespaceObject.IconCompass3D))]),
@@ -2765,46 +2975,37 @@ const __default__ = {
2765
2975
 
2766
2976
  }, 8
2767
2977
  /* PROPS */
2768
- , ["style"])]),
2978
+ , ["size", "style"])]),
2769
2979
  _: 1
2770
2980
  /* STABLE */
2771
2981
 
2772
2982
  }, 8
2773
2983
  /* PROPS */
2774
- , ["title"])], 512
2775
- /* NEED_PATCH */
2776
- ), [[external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.vShow, __props.showToolButtons]])], 8
2777
- /* PROPS */
2778
- , _hoisted_2)]);
2984
+ , ["title", "style"]);
2779
2985
  };
2780
2986
  }
2781
2987
 
2782
2988
  }));
2783
- ;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceView.vue?vue&type=script&setup=true&lang=js
2989
+ ;// CONCATENATED MODULE: ./src/webgl/compass/Compass.vue?vue&type=script&setup=true&lang=js
2784
2990
 
2785
- ;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceView.vue
2991
+ ;// CONCATENATED MODULE: ./src/webgl/compass/Compass.vue
2786
2992
 
2787
2993
 
2788
2994
 
2789
- const __exports__ = ScenceViewvue_type_script_setup_true_lang_js;
2995
+ const Compass_exports_ = Compassvue_type_script_setup_true_lang_js;
2790
2996
 
2791
- /* harmony default export */ var ScenceView = (__exports__);
2792
- ;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/init.js"
2793
- var init_js_namespaceObject = require("@kq_npm/client_common_vue/init.js");
2794
- var init_js_default = /*#__PURE__*/__webpack_require__.n(init_js_namespaceObject);
2795
- ;// CONCATENATED MODULE: ./src/webgl/scenceview/index.js
2997
+ /* harmony default export */ var Compass = (Compass_exports_);
2998
+ ;// CONCATENATED MODULE: ./src/webgl/compass/index.js
2796
2999
 
2797
3000
 
2798
3001
 
2799
3002
 
2800
- ScenceView.install = (Vue, opts) => {
3003
+ Compass.install = (Vue, opts) => {
2801
3004
  init_js_default()(Vue, opts);
2802
- Vue.component(ScenceView.name, ScenceView);
3005
+ Vue.component(Compass.name, Compass);
2803
3006
  };
2804
3007
 
2805
3008
 
2806
- ;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
2807
- var gis_utils_namespaceObject = require("@kq_npm/client_common_vue/_utils/gis-utils");
2808
3009
  ;// CONCATENATED MODULE: ./src/webgl/baseterraingallery/BaseterrainGalleryViewModel.js
2809
3010
 
2810
3011
  //地形淹没分析逻辑类
@@ -2883,7 +3084,7 @@ const BaseterrainGalleryvue_type_script_setup_true_lang_js_hoisted_1 = {
2883
3084
  const BaseterrainGalleryvue_type_script_setup_true_lang_js_hoisted_2 = {
2884
3085
  class: "divSpan"
2885
3086
  };
2886
- const BaseterrainGalleryvue_type_script_setup_true_lang_js_hoisted_3 = ["src"];
3087
+ const _hoisted_3 = ["src"];
2887
3088
  const _hoisted_4 = ["src"];
2888
3089
  const _hoisted_5 = ["src"];
2889
3090
 
@@ -2997,7 +3198,7 @@ const BaseterrainGalleryvue_type_script_setup_true_lang_js_default_ = {
2997
3198
  alt: ""
2998
3199
  }, null, 8
2999
3200
  /* PROPS */
3000
- , BaseterrainGalleryvue_type_script_setup_true_lang_js_hoisted_3)]),
3201
+ , _hoisted_3)]),
3001
3202
  _: 1
3002
3203
  /* STABLE */
3003
3204
 
@@ -20537,6 +20738,176 @@ Roller.install = (Vue, opts) => {
20537
20738
  };
20538
20739
 
20539
20740
 
20741
+ ;// CONCATENATED MODULE: ./src/webgl/underground/UndergroundViewModel.js
20742
+
20743
+ class UndergroundViewModel {
20744
+ constructor(viewer) {
20745
+ _defineProperty(this, "_viewer", null);
20746
+
20747
+ _defineProperty(this, "_undergroundManager", null);
20748
+
20749
+ this._viewer = viewer;
20750
+ this._undergroundManager = new Cesium.Kq3dUndergroundManager(this._viewer.scene);
20751
+ }
20752
+
20753
+ open() {
20754
+ this._viewer.scene.skyAtmosphere.show = false; // 关闭碰撞检测
20755
+
20756
+ this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = false; // false;
20757
+ // 关闭深度检测
20758
+
20759
+ this._viewer.scene.globe.depthTestAgainstTerrain = false; // false;
20760
+
20761
+ window.Cesium.Kq3dUndergroundMixin(this._viewer.scene); // 开启地下模式
20762
+
20763
+ this._undergroundManager.undergroundEnabled = true; // true;
20764
+ // 开启地形透明
20765
+
20766
+ this._undergroundManager.transparentEnabled = true; // true;
20767
+ // 设置地形透明度,透明度在0-1之间
20768
+
20769
+ this._undergroundManager.transparent = 0.5;
20770
+ }
20771
+
20772
+ close() {
20773
+ this._viewer.scene.skyAtmosphere.show = true; // 开启碰撞检测
20774
+
20775
+ this._viewer.scene.screenSpaceCameraController.enableCollisionDetection = true; // true;
20776
+ // 开启深度检测
20777
+
20778
+ this._viewer.scene.globe.depthTestAgainstTerrain = true; // true;
20779
+ // 关闭地下模式
20780
+
20781
+ this._undergroundManager.undergroundEnabled = false; // false;
20782
+ // 关闭地形透明
20783
+
20784
+ this._undergroundManager.transparentEnabled = false; // false;
20785
+ // 设置地形透明度,透明度在0-1之间
20786
+
20787
+ this._undergroundManager.transparent = 0;
20788
+ }
20789
+
20790
+ destroy() {
20791
+ this.close();
20792
+ }
20793
+
20794
+ }
20795
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/dist/index.js??ruleSet[0]!./src/webgl/underground/Underground.vue?vue&type=script&setup=true&lang=js
20796
+
20797
+ const Undergroundvue_type_script_setup_true_lang_js_hoisted_1 = {
20798
+ class: "kq3d-underground"
20799
+ };
20800
+
20801
+
20802
+
20803
+ const Undergroundvue_type_script_setup_true_lang_js_default_ = {
20804
+ name: "kq3dUnderground"
20805
+ };
20806
+ /* harmony default export */ var Undergroundvue_type_script_setup_true_lang_js = (/*#__PURE__*/Object.assign(Undergroundvue_type_script_setup_true_lang_js_default_, {
20807
+ props: {
20808
+ //设置参数
20809
+ top: {
20810
+ type: Number,
20811
+ default: 20
20812
+ },
20813
+ right: {
20814
+ type: Number,
20815
+ default: 20
20816
+ }
20817
+ },
20818
+
20819
+ setup(__props) {
20820
+ const props = __props;
20821
+ const {
20822
+ proxy
20823
+ } = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.getCurrentInstance)(); //获取组件传参
20824
+
20825
+ let value = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(true);
20826
+ const value1 = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(true);
20827
+ let currentLang = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)("");
20828
+ let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)({});
20829
+ let isUndergroundMode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.ref)(false);
20830
+ let viewer = null;
20831
+ let viewModel = null;
20832
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onMounted)(() => {
20833
+ // currentLang.value = proxy.$i18n.locale; // 获取当前语言
20834
+ gis_utils_namespaceObject.utils.getWebMap(null, scenceView => {
20835
+ if (scenceView) {
20836
+ viewer = scenceView._viewer;
20837
+ language.value = scenceView._language;
20838
+ viewModel = new UndergroundViewModel(viewer);
20839
+ }
20840
+ });
20841
+ });
20842
+
20843
+ function undergroundChange() {
20844
+ if (isUndergroundMode.value) {
20845
+ viewModel.open();
20846
+ } else {
20847
+ viewModel.close();
20848
+ }
20849
+ } // 销毁
20850
+
20851
+
20852
+ (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.onBeforeUnmount)(() => {
20853
+ viewModel && viewModel.destroy();
20854
+ });
20855
+ return (_ctx, _cache) => {
20856
+ const _component_kq_switch = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-switch");
20857
+
20858
+ const _component_kq_form = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.resolveComponent)("kq-form");
20859
+
20860
+ return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementBlock)("section", Undergroundvue_type_script_setup_true_lang_js_hoisted_1, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_form, {
20861
+ "label-width": "120px",
20862
+ "label-position": "left"
20863
+ }, {
20864
+ default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createElementVNode)("div", {
20865
+ class: "kq3d-underground-switch",
20866
+ style: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.normalizeStyle)('top: ' + props.top + 'px; right: ' + props.right + 'px;')
20867
+ }, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.createVNode)(_component_kq_switch, {
20868
+ modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.unref)(isUndergroundMode),
20869
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_namespaceObject.isRef)(isUndergroundMode) ? isUndergroundMode.value = $event : isUndergroundMode = $event),
20870
+ onChange: undergroundChange,
20871
+ "active-color": "#409EFF",
20872
+ "inactive-color": "#C0CCDA",
20873
+ width: 30,
20874
+ "active-text": "地下",
20875
+ style: {
20876
+ "margin-right": "'5px'"
20877
+ }
20878
+ }, null, 8
20879
+ /* PROPS */
20880
+ , ["modelValue"])], 4
20881
+ /* STYLE */
20882
+ )]),
20883
+ _: 1
20884
+ /* STABLE */
20885
+
20886
+ })]);
20887
+ };
20888
+ }
20889
+
20890
+ }));
20891
+ ;// CONCATENATED MODULE: ./src/webgl/underground/Underground.vue?vue&type=script&setup=true&lang=js
20892
+
20893
+ ;// CONCATENATED MODULE: ./src/webgl/underground/Underground.vue
20894
+
20895
+
20896
+
20897
+ const Underground_exports_ = Undergroundvue_type_script_setup_true_lang_js;
20898
+
20899
+ /* harmony default export */ var Underground = (Underground_exports_);
20900
+ ;// CONCATENATED MODULE: ./src/webgl/underground/index.js
20901
+
20902
+
20903
+
20904
+
20905
+ Underground.install = (Vue, opts) => {
20906
+ init_js_default()(Vue, opts);
20907
+ Vue.component(Underground.name, Underground);
20908
+ };
20909
+
20910
+
20540
20911
  ;// CONCATENATED MODULE: ./src/webgl/components.js
20541
20912
  /**
20542
20913
  * Author: 朱鹏超
@@ -20545,6 +20916,13 @@ Roller.install = (Vue, opts) => {
20545
20916
  * LastEditors: 朱鹏超
20546
20917
  */
20547
20918
 
20919
+ // 三维地图快捷工具
20920
+
20921
+
20922
+
20923
+
20924
+
20925
+
20548
20926
  // 在线地形
20549
20927
 
20550
20928
 
@@ -20592,6 +20970,8 @@ Roller.install = (Vue, opts) => {
20592
20970
 
20593
20971
 
20594
20972
 
20973
+
20974
+
20595
20975
 
20596
20976
 
20597
20977
 
@@ -20620,7 +21000,11 @@ const webglComponents = {
20620
21000
  Kq3dCompareMap: CompareMap,
20621
21001
  Kq3dHawkeye: Hawkeye,
20622
21002
  Kq3dRoller: Roller,
20623
- Kq3dScreenShot: Screenshot
21003
+ Kq3dScreenShot: Screenshot,
21004
+ Kq3dFixedZoom: FixedZoom,
21005
+ Kq3dResetView: ResetView,
21006
+ Kq3dCompass: Compass,
21007
+ kq3dUnderground: Underground
20624
21008
  }; // 全局引入
20625
21009
 
20626
21010
  const install = function (Vue, opts = {}) {