【类 型】:feat 指点图标 点击弹出 ‘气泡说明’

【原  因】:
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-10-12 11:36:32 +08:00
parent 9b446416b0
commit 39853d620f
2 changed files with 9 additions and 2 deletions

View File

@ -570,6 +570,11 @@ export default {
draggable: false//
})
.setLngLat(lonLat)
.setPopup(
new mapboxgl.Popup({ offset: 32 }).setHTML(
'<h3>指点</h3>'
)
) //
.addTo(this.map)
},
/**

View File

@ -23,7 +23,7 @@
<span slot="footer" class="dialog-footer">
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
<el-button size="medium" type="primary"
@click="publishFun(`{guidedMode:{lon:${guidedLonLat.lon},lat:${guidedLonLat.lat},alt:${guidedAlt}}`);">飞至</el-button>
@click="publishFun(`{guidedMode:{lon:${guidedLonLat.lon},lat:${guidedLonLat.lat},alt:${guidedAlt}}`); isReserveGuidedMaker = true; dialogVisible = false">飞至</el-button>
</span>
</template>
</el-dialog>
@ -46,6 +46,7 @@ export default {
dialogVisible: false, //
guidedLonLat: {}, //
guidedAlt: '', //
isReserveGuidedMaker: false, //
mapBoxKey: '', // map-box
planesId: this.$route.params.id,
localCount: 0 //
@ -85,7 +86,7 @@ export default {
methods: {
/** 弹出框 关闭事件回调 */
closeCallback () {
if (this.dialogItem === 'guidedBox') { //
if (this.dialogItem === 'guidedBox' && this.isReserveGuidedMaker === false) { //
this.$refs.mapbox.delGuidedMarker()//
}
this.dialogVisible = false
@ -96,6 +97,7 @@ export default {
},
//
handleLongPress (lonLat) {
this.isReserveGuidedMaker = false
this.dialogTitle = '点飞'
this.dialogVisible = true
this.dialogItem = 'guidedBox'