瀏覽代碼

Merge remote-tracking branch 'origin/master'

lchao 11 月之前
父節點
當前提交
55793dda9c
共有 2 個文件被更改,包括 30 次插入21 次删除
  1. 21 21
      zhsq_qk-ui/src/map3d/index.vue
  2. 9 0
      zhsq_qk-ui/src/views/supermap/supermap.vue

+ 21 - 21
zhsq_qk-ui/src/map3d/index.vue

@@ -1,8 +1,8 @@
- <!-- 
+ <!--
  *@description: 地图入口
  *@author: yh Fu
  *@date: 2024-05-13 10:11:52
- *@version: V1.0.5 
+ *@version: V1.0.5
 -->
 
 <template>
@@ -159,7 +159,7 @@ export default {
 
        mapObject3D.add(modelObject3D);
      });
-     
+
      /**
       * 绘制连线(随机生成两个点位)
       */
@@ -210,9 +210,9 @@ export default {
     //  const textureLoader = new THREE.TextureLoader()
     //  const texture = textureLoader.load('@/assets/images/qkq_mapcon.png')
     //  texture.mapping = THREE.EquirectangularReflectionMapping
-    //  const ringMaterial = new THREE.MeshBasicMaterial({ 
+    //  const ringMaterial = new THREE.MeshBasicMaterial({
     //    map:texture,
-    //    color: '#3E422E', 
+    //    color: '#3E422E',
     //    side: THREE.DoubleSide ,
     //    transparent:true,
     //    opacity:0.8,
@@ -234,10 +234,10 @@ export default {
      // 设置光圈的位置
     //  innerRingMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
     //  // 翻转光圈
-    //  innerRingMesh.rotation.x = Math.PI / 1.7; 
-    //  innerRingMesh.rotation.y = Math.PI / 1.05; 
+    //  innerRingMesh.rotation.x = Math.PI / 1.7;
+    //  innerRingMesh.rotation.y = Math.PI / 1.05;
     //  scene.add(innerRingMesh);
-     
+
      // 创建一个蓝色边界的光圈
     //  const outerRingGeometry = new THREE.RingGeometry(31, 30.6, 39);
     //  const outerRingMaterial = new THREE.MeshBasicMaterial({ color: '#A5A973', side: THREE.DoubleSide });
@@ -246,15 +246,15 @@ export default {
     //  // 设置光圈的位置
     //  outerRingMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
     //  // 翻转光圈
-    //  outerRingMesh.rotation.x = Math.PI / 1.7; 
-    //  outerRingMesh.rotation.y = Math.PI / 1.05; 
+    //  outerRingMesh.rotation.x = Math.PI / 1.7;
+    //  outerRingMesh.rotation.y = Math.PI / 1.05;
     //  scene.add(outerRingMesh);
 
     //  // 设置光圈的位置
     //  ringMesh.position.set(0,-10,0); // 调整位置到适当的地图坐标
     //  // 翻转光圈
-    //  ringMesh.rotation.x = Math.PI / 1.7; 
-    //  ringMesh.rotation.y = Math.PI / 1.05; 
+    //  ringMesh.rotation.x = Math.PI / 1.7;
+    //  ringMesh.rotation.y = Math.PI / 1.05;
     //  console.log('光圈参数',ringMesh)
     //  scene.add(ringMesh);
 
@@ -304,18 +304,18 @@ export default {
        );
        const tooltipEl = document.getElementById('toolTipRef')
        if (lastPick) {
-         
+
          const properties = lastPick.object.parent.customProperties;
          if (lastPick.object.material[0]) {
            lastPick.object.material[0].color.set(mapConfig.mapHoverColor);
            lastPick.object.material[0].opacity = 1; // 设置完全不透明
          }
-         if (tooltipEl && tooltipEl.style) {
-           toolTipRef.style.left = e.clientX + 20 + "px";
-           toolTipRef.style.top = e.clientY + 20 + "px";
-           toolTipRef.style.visibility = "visible";
-         }
-         this.toolTipData.text = properties.name
+         // if (tooltipEl && tooltipEl.style) {
+         //   toolTipRef.style.left = e.clientX + 20 + "px";
+         //   toolTipRef.style.top = e.clientY + 20 + "px";
+         //   toolTipRef.style.visibility = "visible";
+         // }
+         // this.toolTipData.text = properties.name
        } else {
          tooltipEl.style.visibility = "hidden";
        }
@@ -392,7 +392,7 @@ export default {
      if(!eventFlag){
        window.addEventListener("resize", onResizeEvent, false);
        window.addEventListener("mousemove", onMouseMoveEvent, false);
-       window.addEventListener("dblclick", onDblclickEvent, false); 
+       window.addEventListener("dblclick", onDblclickEvent, false);
        eventFlag = true
      }
 
@@ -420,4 +420,4 @@ export default {
  overflow: hidden;
  position: relative;
 }
-</style>
+</style>

+ 9 - 0
zhsq_qk-ui/src/views/supermap/supermap.vue

@@ -20,6 +20,7 @@ export default {
       zoom: "",
       iServerJieDaoSheQuMap: "",
       iServerQkYingxiangtuMap: "",
+      iServerQkYingxiangtuMapLunKuo: "",
       iServerJilinshengAndQikaiMap: "",
       datasourceName: "",
       datasetName: "",
@@ -33,8 +34,10 @@ export default {
       workspace_qk: "",
       workspace_jdsq: "",
       workspace_qkyxt: "",
+      workspace_qkyxtlk: "",
       map_jilinShiLiang: "",
       map_qikaiYingXiang: "",
+      map_qikaiYingXiangLunKuo: "",
       //选择用到的
       resultData: [],
       // 街道
@@ -99,17 +102,22 @@ export default {
         this.iServerJilinshengAndQikaiMap = response.data.superMapIServerJilinshengAndQikaiMap;
         this.iServerJieDaoSheQuMap = response.data.superMapIServerJiedaoshequMap;
         this.iServerQkYingxiangtuMap = response.data.superMapIServerJilinshengYingxaingAndQikaiMap;
+        this.iServerQkYingxiangtuMapLunKuo = response.data.superMapIServerQikaiOutlineMap;
         this.dataUrl = response.data.superMapIServerJiedaoshequMap;
         this.url = response.data.superMapIServerJiedaoshequMap;
         this.workspace_qk = this.iServerJilinshengAndQikaiMap;//省矢量及区影像,固定加载。
         this.workspace_jdsq = this.iServerJieDaoSheQuMap;//街道社区的地图服务路径
         this.workspace_qkyxt = this.iServerQkYingxiangtuMap;//汽开区影像图
+        this.workspace_qkyxtlk = this.iServerQkYingxiangtuMapLunKuo;//汽开区影像轮廓图
         this.map_jilinShiLiang = window.L.supermap.tiledMapLayer(this.workspace_qk, {
           noWrap: true
         });
         this.map_qikaiYingXiang = window.L.supermap.tiledMapLayer(this.workspace_qkyxt + '/经开影像', {
           noWrap: true
         });
+        this.map_qikaiYingXiangLunKuo = window.L.supermap.tiledMapLayer(this.workspace_qkyxtlk, {
+          noWrap: true
+        });
         this.initSlt();
       });
     },
@@ -128,6 +136,7 @@ export default {
     initYxt: async function () {
       if (this.yxtSlt == 'yxt') {//影像图
         this.layers.push(this.map_qikaiYingXiang);//汽开影像
+        this.layers.push(this.map_qikaiYingXiangLunKuo);//汽开影像轮廓
       }
       this.initZxd();
     },