40 lines
843 B
Vue
40 lines
843 B
Vue
![]() |
<template>
|
||
|
<view style="height: 80vh;">
|
||
|
<map style="width: 100%;height: 714rpx;" :layer-style='5' :latitude="latitude" :longitude="longitude"
|
||
|
:markers="marker" :scale="scale" @markertap="markertap" @callouttap='callouttap' @tap="tap">
|
||
|
</map>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
|
||
|
data() {
|
||
|
return {
|
||
|
latitude: 36.858810, //纬度
|
||
|
longitude: 117.749930, //经度
|
||
|
scale: 13, //缩放级别
|
||
|
compass: true,
|
||
|
marker: [],
|
||
|
}
|
||
|
},
|
||
|
methods: {
|
||
|
// 点击标记点时触发
|
||
|
markertap(e) {
|
||
|
console.log('点击标记点时触发', e)
|
||
|
},
|
||
|
// 点击标记点对应的气泡时触发,
|
||
|
callouttap(e) {
|
||
|
console.log('点击标记点对应的气泡时触发', e)
|
||
|
},
|
||
|
// 点击地图时触发
|
||
|
tap(e) {
|
||
|
console.log('点击地图时触发', e)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
|
||
|
</style>
|