# 初步完成跳转标记地图
This commit is contained in:
parent
720b6a3b63
commit
ec4e49f5da
|
@ -158,6 +158,17 @@ export default {
|
|||
if (this.coordinate === null) {
|
||||
this.coordinate = [113.203460828994, 22.64902452257]
|
||||
}
|
||||
const map = new AMap.Map('map-container', {
|
||||
center: this.coordinate,
|
||||
resizeEnable: true,
|
||||
zoom: 16
|
||||
})
|
||||
new AMap.Marker({
|
||||
position: this.coordinate,
|
||||
zIndex: 10,
|
||||
title: this.deviceList[0].title,
|
||||
map: map
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -168,10 +179,10 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
const device_id = this.$store.getters.deviceID
|
||||
if (this.mapClick) {
|
||||
this.getDevicesInitMap({ device_id })
|
||||
this.flag = true
|
||||
const device_id = this.$store.getters.deviceID
|
||||
this.getDevicesInitMap({ device_id })
|
||||
} else {
|
||||
this.initMap()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue