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