uni-app map組件的marker


<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view>
<map :latitude="latitude" :longitude="longitude" :markers="covers">
</map>
</view>
</view>
<image src="../../static/app-plus/location@3x.png"></image>
</view>
</template>

<script>
export default {
data() {
return {
title: 'map',
latitude: 39.909,
longitude: 116.39742,
covers: [{
latitude: 39.9085,
longitude: 116.39747,
// #ifdef APP-PLUS
iconPath: '../../static/app-plus/location@3x.png',
// #endif
// #ifndef APP-PLUS
iconPath: '../../static/location.png',
// #endif
}, {
latitude: 39.90,
longitude: 116.39,
// #ifdef APP-PLUS
iconPath: '../../static/app-plus/location@3x.png',
// #endif
// #ifndef APP-PLUS
iconPath: '../../static/location.png',
// #endif
}]
}
},
methods: {

}
}
</script>


<style>
map {
width: 100%;
height: 600rpx;
}
</style>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM