diff --git a/src/views/bigScreen/map/index.vue b/src/views/bigScreen/map/index.vue index 51339b2..cdaf7d1 100644 --- a/src/views/bigScreen/map/index.vue +++ b/src/views/bigScreen/map/index.vue @@ -243,14 +243,14 @@ export default { }); // 电子底图/百度 - // this.basemap = L.tileLayer( - // "https://api.mapbox.com/styles/v1/sharealex/cllg9dw1i00iz01oj9zmu6iv7/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic2hhcmVhbGV4IiwiYSI6ImNsaXNhZmRjbTFhbnczZmxib3h1OW05YXYifQ.PhlKv60ar3K359d8x2yBPw", - // { - // maxZoom: 18, - // minZoom: 9, - // subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"], - // } - // ).addTo(this.globalMap); + this.basemap = L.tileLayer( + "https://api.mapbox.com/styles/v1/sharealex/cllg9dw1i00iz01oj9zmu6iv7/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic2hhcmVhbGV4IiwiYSI6ImNsaXNhZmRjbTFhbnczZmxib3h1OW05YXYifQ.PhlKv60ar3K359d8x2yBPw", + { + maxZoom: 18, + minZoom: 9, + subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"], + } + ).addTo(this.globalMap); // this.basemap = L.tileLayer( // "/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}", @@ -278,27 +278,27 @@ export default { // ) // .addTo(this.globalMap); // 电子地图 - this.electronicMap = L.tileLayer - .chinaProvider("GaoDe.Normal.Map", { - maxZoom: 18, - minZoom: 5, - color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 - }) - // 卫星地图 - this.satelliteMap = L.tileLayer - .chinaProvider("GaoDe.Satellite.Map", { - maxZoom: 18, - minZoom: 5, - color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 - }) - // 卫星地图注记 - this.satelliteNoteMap = L.tileLayer - .chinaProvider("GaoDe.Satellite.Annotion", { - maxZoom: 18, - minZoom: 5, - color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 - }) - this.globalMap.addLayer(this.electronicMap) + // this.electronicMap = L.tileLayer + // .chinaProvider("GaoDe.Normal.Map", { + // maxZoom: 18, + // minZoom: 5, + // color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 + // }) + // // 卫星地图 + // this.satelliteMap = L.tileLayer + // .chinaProvider("GaoDe.Satellite.Map", { + // maxZoom: 18, + // minZoom: 5, + // color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 + // }) + // // 卫星地图注记 + // this.satelliteNoteMap = L.tileLayer + // .chinaProvider("GaoDe.Satellite.Annotion", { + // maxZoom: 18, + // minZoom: 5, + // color: { r: 10, g: 38, b: 74 }, //自定义颜色滤镜 + // }) + this.globalMap.addLayer(this.basemap) // L.tileLayer // .chinaProvider("GaoDe.Satellite.Annotion", { // maxZoom: 18, @@ -1092,15 +1092,15 @@ export default { }, actionBtn(id) { this.action = id; - if(id == 1) { - this.globalMap.removeLayer(this.satelliteMap); - this.globalMap.removeLayer(this.satelliteNoteMap); - this.globalMap.addLayer(this.electronicMap); - } else { - this.globalMap.removeLayer(this.electronicMap); - this.globalMap.addLayer(this.satelliteMap); - this.globalMap.addLayer(this.satelliteNoteMap); - } + // if(id == 1) { + // this.globalMap.removeLayer(this.satelliteMap); + // this.globalMap.removeLayer(this.satelliteNoteMap); + // this.globalMap.addLayer(this.electronicMap); + // } else { + // this.globalMap.removeLayer(this.electronicMap); + // this.globalMap.addLayer(this.satelliteMap); + // this.globalMap.addLayer(this.satelliteNoteMap); + // } // console.log(id) // this.$emit('actionBtn',id); // if(id == 1){