From 26739237e2d93460eb869067a6004bfa63a1bdb8 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 27 六月 2022 10:16:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/wvp-28181-2.0' into commercial --- web_src/src/components/map.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/web_src/src/components/map.vue b/web_src/src/components/map.vue index caf36d4..e9e8628 100644 --- a/web_src/src/components/map.vue +++ b/web_src/src/components/map.vue @@ -266,7 +266,20 @@ this.channel = channels[0] } this.$nextTick(() => { - this.infoBoxId = this.$refs.map.openInfoBox([this.channel.longitude, this.channel.latitude], this.$refs.infobox, [0, -50]) + let longitudeStr; + let latitudeStr; + if (window.mapParam.coordinateSystem == "GCJ-02") { + longitudeStr = "longitudeGcj02"; + latitudeStr = "latitudeGcj02"; + }else if (window.mapParam.coordinateSystem == "WGS84") { + longitudeStr = "longitudeWgs84"; + latitudeStr = "latitudeWgs84"; + }else { + longitudeStr = "longitude"; + latitudeStr = "latitude"; + } + let position = [this.channel[longitudeStr], this.channel[latitudeStr]]; + this.infoBoxId = this.$refs.map.openInfoBox(position, this.$refs.infobox, [0, -50]) }) }, closeInfoBox: function () { -- Gitblit v1.8.0