From 799a69b8b0a03e44ed124e63509b2650599057b9 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 07 Dec 2023 18:34:38 +0800
Subject: [PATCH] 实时定位,位置处理; 不同校区,显示位置做处理; 切换校区显示内容做处理;
---
src/components/mobileCortrolButtom/index.vue | 77 +++++++++++++++++++-------------------
1 files changed, 39 insertions(+), 38 deletions(-)
diff --git a/src/components/mobileCortrolButtom/index.vue b/src/components/mobileCortrolButtom/index.vue
index 6a19ac7..3501810 100644
--- a/src/components/mobileCortrolButtom/index.vue
+++ b/src/components/mobileCortrolButtom/index.vue
@@ -70,6 +70,9 @@
}
},
props: ['mapCenter', 'frislayertHeight'],
+
+ inject: ['mobileMapElement'],
+
computed: {
...mapGetters([
'openmobileGoTo',
@@ -86,10 +89,18 @@
},
methods: {
openOurSee () {
+ let url
+
+ if (this.mobileMapElement.campusValue == 1) {
+ url = 'https://vr.jxpskj.com:1443/JXKESFDX_HJZXQ/'
+ } else {
+ url = 'https://vr.jxpskj.com:1443/JXKJSFDX_FLXQ/'
+ }
+
this.$store.commit(
'MSET_OPENMOBILEPANORAMA',
// 'https://vr.jxpskj.com/JXSFKZQJ/QJ/' // sd
- 'https://vr.jxpskj.com:1443/JXKESFDX_HJZXQ/' // jg
+ url // jg
)
},
@@ -99,26 +110,27 @@
var options = { timeout: 8000 }// 设置定位超时
window.geolocation.getLocation(showPosition, showErrow, options)
- // this.$store.commit('GET_NOWPOSITION', (res) => {
- // that.$store.dispatch('pcMoveView', {
- // jd: res[0],
- // wd: res[1],
- // viewer: global.viewer
- // })
+ this.$store.commit('GET_NOWPOSITION', (res) => {
+ that.$store.dispatch('pcMoveView', {
+ jd: res[0],
+ wd: res[1],
+ viewer: global.viewer
+ })
- // const data = [
- // {
- // name: '我的位置',
- // jd: res[0],
- // wd: res[1]
- // }
- // ]
- // that.$store.dispatch('addLabelLayerIconMobelUse', {
- // list: data,
- // clear: true,
- // mviewer: global.viewer
- // })
- // })
+ const data = [
+ {
+ name: '我的位置',
+ jd: res[0],
+ wd: res[1]
+ }
+ ]
+
+ that.$store.dispatch('addLabelLayerIconMobelUse', {
+ list: data,
+ clear: true,
+ mviewer: global.viewer
+ })
+ })
function showPosition (result) {
const position = GCJ02ToWGS84(result.lng, result.lat)
@@ -179,24 +191,13 @@
},
zoomIns (val) {
- // this.$store.dispatch("mapFlyTo", {
- // //飞入
- // lntLat: [115.87988885, 28.72502592, 2100],
- // // lntLat: [115.87186406, 28.74449337, 1200],
- // // lntLat: [121.50492752204283, 31.21567802276832, 2530],
- // heading: 0,
- // pitch: -45,
- // roll: 0,
- // noOpen: true,
- // });
- // if (val) {
- // if (this.dimension != val) {
- // this.$store.dispatch("MSET_DIMENSIONS", val);
- // }
- // return;
- // }
- this.map2D.getView().setCenter([11000, -4900])
- this.map2D.getView().setResolution(2.116670900008467)
+ if (this.mobileMapElement.campusValue == 1) {
+ this.map2D.getView().setCenter([112.613918275550715, -0.0457081387615907618595])
+ this.map2D.getView().setResolution(0.00001903568804664224)
+ } else {
+ this.map2D.getView().setCenter([112.6202242373625, -0.0781745423945008147645])
+ this.map2D.getView().setResolution(0.00001903568804664224)
+ }
},
openActivity () {
--
Gitblit v1.9.3