修改底图

dhy
吕天方 1 year ago
parent 3617581742
commit e35925a80e

@ -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){

Loading…
Cancel
Save