From 39ae22d36e59ba9b432c325974b3f14b2381a674 Mon Sep 17 00:00:00 2001 From: HAHA Date: Mon, 4 Jul 2022 10:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=9C=B0=E5=9B=BE=E7=BB=8F?= =?UTF-8?q?=E7=BA=AC=E5=BA=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/organization/organization.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index d3cd7833..8860180f 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -2188,7 +2188,12 @@ export default { document.getElementById("con").innerHTML = '当前点击坐标为:' var position = document.getElementById("pos"); - var center = new window.TMap.LatLng(this.latitude, this.longitude);//设置中心点坐标 + if(this.latitude === null || this.latitude === "" || this.longitude === null || this.longitude === ""){ + var center = new window.TMap.LatLng(36.116796, 120.339959); + }else { + var center = new window.TMap.LatLng(this.latitude, this.longitude);//设置中心点坐标 + } + //初始化地图 var map = new window.TMap.Map("con", { center: center