Browse Source

改bug喽

feature
dai 3 years ago
parent
commit
3177aa5a32
  1. 2
      src/views/modules/cpts/base/cpts/edit.vue
  2. 36
      src/views/modules/visual/command/cpts/map.vue

2
src/views/modules/cpts/base/cpts/edit.vue

@ -628,7 +628,7 @@ export default {
// map TMap.Map()
map = new window.TMap.Map(document.getElementById("app"), {
center: center, //
zoom: 15, //
zoom: 13, //
pitch: 43.5, //
rotation: 45, //
});

36
src/views/modules/visual/command/cpts/map.vue

@ -147,25 +147,12 @@ export default {
},
},
computed: {},
components: {
cptCard,
cptTb,
cptPopup,
},
watch: {},
async mounted() {
//
window._AMapSecurityConfig = {
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2",
};
this.iniMap();
},
computed: {
polygonData() {
const { srcGridData } = this;
@ -314,6 +301,20 @@ export default {
},
},
async mounted() {
console.log("指挥调度map初始化啦");
//
window._AMapSecurityConfig = {
securityJsCode: "92ea2c965c6cf1ba7ee3a8fe01449ef2",
};
this.iniMap();
//
searchMarker = null;
searchBgLayer = null;
},
methods: {
iniMap() {
const { darkStyle, lightStyle, srcGridData } = this;
@ -680,10 +681,11 @@ export default {
}
if (searchBgLayer) {
console.log("searchBgLayer已经存在了", searchBgLayer);
searchBgLayer.setData(sourceData);
} else {
searchBgLayer = new PolygonLayer({
// autoFit: true,
// autoFit: true,
})
.source(sourceData)
.color("#f0f")
@ -733,10 +735,14 @@ export default {
},
removeDotMarker() {
console.log("removeDotMarker");
if (searchMarker) {
searchMarker.remove();
}
this.drawSearchBg();
if (searchBgLayer) {
console.log("removeDotMarker-----searchBgLayer");
this.drawSearchBg();
}
},
//

Loading…
Cancel
Save