</template>
<script>
export default {
data() {
return {
context:{
longitude:102.74055,
latitude: 25.1578,
markers:[]
}
}
},
created() {
this.handleCreate()
},
methods: {
handleCreate(){
let marker = {
id: 1,
iconPath:'/static/marker-icon.png',
longitude:this.context.longitude,
latitude:this.context.latitude,
title: '桥梁'
}
this.context.markers.push(marker)
}
}
}
</script>
<style>
mapContainer{
width: 100%;
height: 500px;
}
</style>
1 个回复
DCloud_UNI_Anne
感谢您的反馈,已加分
相关问题帖子:https://ask.dcloud.net.cn/question/133590