ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

uni-app map组件的marker

2021-07-22 11:34:22  阅读:16  来源: 互联网

标签:.. app PLUS static location iconPath marker uni png


<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>

标签:..,app,PLUS,static,location,iconPath,marker,uni,png
来源: https://www.cnblogs.com/xushan03/p/15043248.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有