派生自 wuyushui/SewerAndRainNetwork

wangrui
2020-12-22 b59fe688dd6034cf3080889c15113dff052fbabb
地图底图错位
4个文件已修改
26 ■■■■ 已修改文件
src/components/helpers/BasemapHelper.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/helpers/ServiceLayerHelper.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/conf/MapConfig.js 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/helpers/BasemapHelper.js
@@ -18,9 +18,9 @@
     * @param defBasemapName 初始化完成后,默认显示的图层
     */
    initBasemap = (mapConfig, isIntranet) => {
        if(isIntranet) {
            this._getToken(mapConfig); // 获取token,并按配置加载地图
        }else {
        if(isIntranet) { // 内网
            this._getToken(mapConfig); // 获取token后,并按配置加载地图
        }else { // 外网
            this._createBasemapByConfig(mapConfig)
        }
src/components/helpers/ServiceLayerHelper.js
@@ -8,6 +8,7 @@
        this.L = options.L
        this.tileLayersMap = new Map()
        this.tileLayersArray = []
        this.mapConfig = {}
    }
    /**
@@ -15,6 +16,7 @@
     */
    initServiceLayers(mapConfig){
        console.log(mapConfig)
        this.mapConfig = mapConfig
    }
    /**
src/conf/MapConfig.js
@@ -39,7 +39,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
            annotation: {
@@ -52,7 +52,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
        },
@@ -70,7 +70,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
            annotation: {
@@ -83,7 +83,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            }
        }
@@ -105,7 +105,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
            annotation: {
@@ -120,7 +120,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
        },
@@ -140,7 +140,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            },
            annotation: {
@@ -155,7 +155,7 @@
                option:{
                    maxZoom: 18,
                    minZoom: 1,
                    zoomOffset: 1
                    zoomOffset: 0
                }
            }
        }
src/main.js
@@ -1,5 +1,5 @@
import Vue from 'vue'
import App from './App.vue'
import App from './App2.vue'
import router from './router'
import store from './store'
// import registerDirectives from './directive'