From c034a5c0250f6529a617a32e2874b6dec6cffa13 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 7 Sep 2022 15:03:21 +0800 Subject: [PATCH] ma pmap --- src/views/rain/inspection/components/mapShow.vue | 1 + vue.config.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/rain/inspection/components/mapShow.vue b/src/views/rain/inspection/components/mapShow.vue index b7be972..d2eb0cc 100644 --- a/src/views/rain/inspection/components/mapShow.vue +++ b/src/views/rain/inspection/components/mapShow.vue @@ -61,6 +61,7 @@ this.map.clearOverLays(); this.map.centerAndZoom(new T.LngLat(120.63212, 31.26249), this.zoom) var imageURL = "/MapServerApi/arcgis/rest/services/szhd/ysxzgg/MapServer"; + console.log(imageURL) //创建自定义图层对象 var lay = new T.TileLayer(imageURL, {minZoom: 1, maxZoom: 18}); //将图层增加到地图上 diff --git a/vue.config.js b/vue.config.js index a4e50d9..d76096a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -53,12 +53,12 @@ module.exports = { ['^' + process.env.VUE_APP_BASE_API]: '' } }, - ['^/MapServerApi']: { + '^/MapServerApi': { //target: 'http://patrol.115.langye.net/', - target: "http://192.168.60.22:6080",//'http://192.168.60.100:9001/', + target: "http://192.168.60.22:6080/",//'http://192.168.60.100:9001/', changeOrigin: true, //配置跨域 pathRewrite: { - ['^/MapServerApi']: '' + ['^/MapServerApi']: 'http://192.168.60.22:6080/' } } }