修改底图

dhy
吕天方 1 year ago
parent 3617581742
commit e35925a80e

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

Loading…
Cancel
Save