diff --git a/src/views/mapViews/choosePointDialog.vue b/src/views/mapViews/choosePointDialog.vue index 6bf1803..1c6ba0c 100644 --- a/src/views/mapViews/choosePointDialog.vue +++ b/src/views/mapViews/choosePointDialog.vue @@ -26,7 +26,7 @@ return { type: 'readonly', // 弹窗类型,readonly只读, edit编辑 map: null, // map对象 - center: [27.75962, 116.06021], // 地图中心 + center: this.baseConfig.center, // 地图中心 dialogFormVisible: false, // 对话框是否显示 canEdit: true, // 保存按钮是否可以点击 marker: null, // 图标坐标点,LatLng格式 diff --git a/src/views/mapViews/choosePointDialog.vue b/src/views/mapViews/choosePointDialog.vue index 6bf1803..1c6ba0c 100644 --- a/src/views/mapViews/choosePointDialog.vue +++ b/src/views/mapViews/choosePointDialog.vue @@ -26,7 +26,7 @@ return { type: 'readonly', // 弹窗类型,readonly只读, edit编辑 map: null, // map对象 - center: [27.75962, 116.06021], // 地图中心 + center: this.baseConfig.center, // 地图中心 dialogFormVisible: false, // 对话框是否显示 canEdit: true, // 保存按钮是否可以点击 marker: null, // 图标坐标点,LatLng格式 diff --git a/src/views/mapViews/mapView.vue b/src/views/mapViews/mapView.vue index fa7be28..a0decda 100644 --- a/src/views/mapViews/mapView.vue +++ b/src/views/mapViews/mapView.vue @@ -25,7 +25,7 @@ data() { return { map: null, - zoom: 12, + zoom: this.baseConfig.zoom, maxZoom: 21, minZoom: 10, currentCrs: '3857', @@ -39,9 +39,11 @@ zoomOffset: 1 } }, - mapurl: 'http://t1.tianditu.com/vec_w/wmts?layer=vec&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447', + // mapurl: 'http://t1.tianditu.com/vec_w/wmts?layer=vec&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447', + mapurl: this.baseConfig.mapUrl, // mapurl: 'http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', - labelurl: 'http://t1.tianditu.com/cva_w/wmts?layer=cva&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447' + // labelurl: 'http://t1.tianditu.com/cva_w/wmts?layer=cva&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447' + labelurl: this.baseConfig.labelUrl } }, mounted() { diff --git a/src/views/mapViews/choosePointDialog.vue b/src/views/mapViews/choosePointDialog.vue index 6bf1803..1c6ba0c 100644 --- a/src/views/mapViews/choosePointDialog.vue +++ b/src/views/mapViews/choosePointDialog.vue @@ -26,7 +26,7 @@ return { type: 'readonly', // 弹窗类型,readonly只读, edit编辑 map: null, // map对象 - center: [27.75962, 116.06021], // 地图中心 + center: this.baseConfig.center, // 地图中心 dialogFormVisible: false, // 对话框是否显示 canEdit: true, // 保存按钮是否可以点击 marker: null, // 图标坐标点,LatLng格式 diff --git a/src/views/mapViews/mapView.vue b/src/views/mapViews/mapView.vue index fa7be28..a0decda 100644 --- a/src/views/mapViews/mapView.vue +++ b/src/views/mapViews/mapView.vue @@ -25,7 +25,7 @@ data() { return { map: null, - zoom: 12, + zoom: this.baseConfig.zoom, maxZoom: 21, minZoom: 10, currentCrs: '3857', @@ -39,9 +39,11 @@ zoomOffset: 1 } }, - mapurl: 'http://t1.tianditu.com/vec_w/wmts?layer=vec&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447', + // mapurl: 'http://t1.tianditu.com/vec_w/wmts?layer=vec&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447', + mapurl: this.baseConfig.mapUrl, // mapurl: 'http://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', - labelurl: 'http://t1.tianditu.com/cva_w/wmts?layer=cva&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447' + // labelurl: 'http://t1.tianditu.com/cva_w/wmts?layer=cva&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=adbdd8e08c292f6cb4e3f0289f7d0447' + labelurl: this.baseConfig.labelUrl } }, mounted() { diff --git a/static/project.config.json b/static/project.config.json index ab38d73..b7afa91 100644 --- a/static/project.config.json +++ b/static/project.config.json @@ -1,5 +1,11 @@ { "title": "智慧环卫系统", "baseUrl": "http://111.198.10.15:11409/", - "mainPage": "http://111.198.10.15:11404/dcms/" + "mainPage": "http://111.198.10.15:11404/dcms/", + "singleSys": true, + "city":"崇仁县", + "mapUrl":"https://t0.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=216ee92889e17ab1b083fae665d522b8", + "labelUrl":"https://t0.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=216ee92889e17ab1b083fae665d522b8", + "center":[27.75962, 116.06021], + "zoom":13 }