|
|
|
|
@ -159,7 +159,6 @@
|
|
|
|
|
Circle as sCircle
|
|
|
|
|
} from "ol/style";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import proj4 from 'proj4'
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
@ -204,13 +203,16 @@
|
|
|
|
|
id: "H1",
|
|
|
|
|
title: "河道图"
|
|
|
|
|
}],
|
|
|
|
|
checkList: ['M1', 'L1'],
|
|
|
|
|
checkList: ['M11', 'L1'],
|
|
|
|
|
mapCheckList: [{
|
|
|
|
|
id: "M1",
|
|
|
|
|
title: "高清影像"
|
|
|
|
|
}, {
|
|
|
|
|
id: "M11",
|
|
|
|
|
title: "高清影像精简"
|
|
|
|
|
},{
|
|
|
|
|
id: "L1",
|
|
|
|
|
title: "路网"
|
|
|
|
|
},{
|
|
|
|
|
id: "M1",
|
|
|
|
|
title: "高清影像"
|
|
|
|
|
}],
|
|
|
|
|
configs: CONFIGS,
|
|
|
|
|
mapConfigs: MAPCONFIGS,
|
|
|
|
|
@ -241,7 +243,7 @@
|
|
|
|
|
code: this.mapConfigs.Map_Code,
|
|
|
|
|
units: this.mapConfigs.Map_units,
|
|
|
|
|
axisOrientation: this.mapConfigs.Map_axisOrientation,
|
|
|
|
|
global: this.mapConfigs.Map_global,
|
|
|
|
|
global: this.mapConfigs.Map_global
|
|
|
|
|
});
|
|
|
|
|
addProjection(this.projection);
|
|
|
|
|
// this.initMap();
|
|
|
|
|
@ -255,7 +257,7 @@
|
|
|
|
|
this.$nextTick(function() {
|
|
|
|
|
this.showmap = true
|
|
|
|
|
this.showMap = 'M2'
|
|
|
|
|
this.checkList = ['M1', 'L1']
|
|
|
|
|
this.checkList = ['M11', 'L1']
|
|
|
|
|
this.showMaps()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
@ -460,7 +462,6 @@
|
|
|
|
|
changeMap(val) {
|
|
|
|
|
for (var m of this.mapRadioList) {
|
|
|
|
|
if (m.id == val) {
|
|
|
|
|
console.log("val", val)
|
|
|
|
|
this.checkLayers(val, true)
|
|
|
|
|
} else {
|
|
|
|
|
this.checkLayers(m.id, false)
|
|
|
|
|
@ -472,32 +473,23 @@
|
|
|
|
|
for (var m of this.mapCheckList) {
|
|
|
|
|
this.checkLayers(m.id, false)
|
|
|
|
|
}
|
|
|
|
|
} else if (val.length == this.mapCheckList.length) {
|
|
|
|
|
console.log(val)
|
|
|
|
|
for (var m of this.mapCheckList) {
|
|
|
|
|
this.checkLayers(m.id, true)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
for (var m of this.mapCheckList) {
|
|
|
|
|
if (m.id == val[0]) {
|
|
|
|
|
this.checkLayers(m.id, true)
|
|
|
|
|
} else {
|
|
|
|
|
this.checkLayers(m.id, false)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
for (var m of this.mapCheckList) {
|
|
|
|
|
this.checkLayers(m.id, false)
|
|
|
|
|
}
|
|
|
|
|
for(var k of val){
|
|
|
|
|
this.checkLayers(k, true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 切换地图
|
|
|
|
|
checkLayers(id, bool) {
|
|
|
|
|
|
|
|
|
|
let layers = this.map.getLayers().getArray();
|
|
|
|
|
for (let i = 0; i < layers.length; i++) {
|
|
|
|
|
if (layers[i].get("id") == id) {
|
|
|
|
|
|
|
|
|
|
if (bool) {
|
|
|
|
|
console.log(id)
|
|
|
|
|
layers[i].setVisible(true);
|
|
|
|
|
} else {
|
|
|
|
|
layers[i].setVisible(false);
|
|
|
|
|
|