增加高德地图页面
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
<view class="sendFlex">
|
||||
|
||||
<view class="callpolice">报警</view>
|
||||
<view class="Sendmessage">位置</view>
|
||||
<view class="Sendmessage" @click="location">位置</view>
|
||||
<view class="Sendmessage" @click="handleSend">发送信息</view>
|
||||
</view>
|
||||
|
||||
@ -356,6 +356,12 @@
|
||||
url: '/pages/common/send/index'
|
||||
})
|
||||
},
|
||||
// 位置
|
||||
location(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/common/map/index'
|
||||
})
|
||||
},
|
||||
handleFile(item) {
|
||||
console.log(item, 'item');
|
||||
// communicationMode 0是4G 1是蓝牙
|
||||
@ -374,7 +380,7 @@
|
||||
this.page = 1;
|
||||
this.finished = false;
|
||||
this.getData(); // 重新加载第一页数据
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getTab()
|
||||
|
38
pages/common/map/index.vue
Normal file
38
pages/common/map/index.vue
Normal file
@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<view class="page-section page-section-gap">
|
||||
<map class="map" :latitude="latitude" :longitude="longitude" :customMapStyle="amapStyle" :show-location="true"
|
||||
:markers="covers">
|
||||
</map>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: 0, // 使用 marker点击事件 需要填写id
|
||||
title: 'map',
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
covers: [{
|
||||
latitude: 39.909,
|
||||
longitude: 116.39742,
|
||||
|
||||
}],
|
||||
amapStyle: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.map {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user