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