From bf5ba56e8a82f0ef699f2eae413d0dc2c4e4f67d Mon Sep 17 00:00:00 2001
From: jxdnsong <592566207@qq.com>
Date: Tue, 25 Oct 2022 16:15:00 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/sd-jg-school-web into master

---
 src/components/mobilemap/index.vue |   57 +++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 0c3c80a..a4135ba 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -238,15 +238,15 @@
                             //     })
                             // )
 
-                            // global.viewer.imageryLayers.addImageryProvider(
-                            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
-                            //         url: 'https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=789e558be762ff832392a0393fd8a4f1',
-                            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
-                            //         format: 'image/jpeg',
-                            //         show: true,
-                            //         maximumLevel: 18
-                            //     })
-                            // )
+                            // global.viewer.imageryLayers.addImageryProvider(new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
+                            //     url: 'https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=789e558be762ff832392a0393fd8a4f1',
+                            //     subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
+                            //     format: 'image/jpeg',
+                            //     show: true,
+                            //     maximumLevel: 18
+                            // }
+
+                            // ))
 
                             that.addBaseLayer()
 
@@ -325,11 +325,12 @@
                             window.areaLayer.show = true
                         })
                     that.$store.commit('MSET_areaLayer', window.areaLayer)
-
                     // 判断是否有url参数
                     // console.log(that.urlParameterData);
-                    if (typeof that.urlParameterData != 'string') {
+                    if (JSON.stringify(that.urlParameterData) != '{}') {
                         // console.log(that.urlParameterData);
+
+                        var positionArr = that.urlParameterData.x.split(',')
                         that.$store.commit('initurlParameterLayer') // 初始化自定义标签图层
                         if (that.urlParameterData.methods == 'goto') {
                             // url有定位的参数
@@ -340,8 +341,8 @@
                                 list: [
                                     {
                                         name: that.urlParameterData.name || '无标题',
-                                        jd: that.urlParameterData.jd,
-                                        wd: that.urlParameterData.wd
+                                        jd: positionArr[0],
+                                        wd: positionArr[1]
                                     }
                                 ],
                                 clear: true
@@ -355,12 +356,12 @@
 
                             const d = {
                                 position: {},
-                                lntLat: [+that.urlParameterData.jd, +that.urlParameterData.wd],
+                                lntLat: [+positionArr[0], +positionArr[1]],
                                 query: {
                                     introduce: '暂无内容',
                                     address: '',
                                     ...(that.urlParameterData || {}),
-                                    lntLat: [+that.urlParameterData.jd, +that.urlParameterData.wd]
+                                    lntLat: [+positionArr[0], +positionArr[1]]
                                 },
                                 useJWD: true // 仅使用经纬度
                             }
@@ -368,7 +369,7 @@
                         } else if (that.urlParameterData.methods == 'arc') {
                             const objInit = {
                                 name: that.urlParameterData.mechanismname,
-                                lntLat: [that.urlParameterData.jd, that.urlParameterData.wd],
+                                lntLat: [positionArr[0], positionArr[1]],
                                 alt: that.urlParameterData.gd,
                                 heading: that.urlParameterData.heading,
                                 pitch: that.urlParameterData.pitch,
@@ -674,8 +675,28 @@
             global.viewer.distanceLegend.enable = false
 
             that.viewerExist = true
+
+            const seeNewLayer = new global.DC.VectorLayer('seeNewLayer')
+            global.viewer.addLayer(seeNewLayer)
+
+            const billboard = new global.DC.Billboard(
+                new global.DC.Position(
+                    115.79624983,
+                    28.64160990,
+                    0
+                ), '/zhjg/img/icon/yx.png')
+
+            billboard.size = [67, 266]
+
+            billboard.setStyle({
+                pixelOffset: { x: 0, y: -133 }
+            })
+
+            seeNewLayer.addOverlay(billboard)
         }
         global.DC.ready(window.initViewer)
+
+        console.clear()
     },
     methods: {
         _getCameraFocus (scene) {
@@ -935,8 +956,8 @@
             const that = this
             tilesetLayer = new global.DC.TilesetLayer('tilesetLayer')
             global.viewer.addLayer(tilesetLayer)
-            tileset = new global.DC.Tileset('/zhxy/mx/tileset.json', {
-                luminanceAtZenith: 0.4,
+            tileset = new global.DC.Tileset('/zhjg/mx/tileset.json', {
+                luminanceAtZenith: 0.2,
                 // cullWithChildrenBounds: false,
                 // cullRequestsWhileMoving: false,
                 // skipLevelOfDetail: false,

--
Gitblit v1.9.3