便利贴--38{uni +map 基本 使用}

27 篇文章 0 订阅
10 篇文章 0 订阅

便利贴--38{uni +map 基本 使用}

使用


<map :scale='18' id="myMap" style="width: 100%" :style="{height: mapHeight + 'px'}" :markers="markers"
			:longitude="longitude" :latitude="latitude" :circles="circles" :polyline="mypolylines" show-location="true">

			<cover-view class="dingwBut" @click="mapControlsBack">

				<cover-image src="./map/img/dingwei.png" @click="mapControlsBack" :class="[oncePotion?'oncePotion':'']">
				</cover-image>
			</cover-view>

		</map>

数据

mapHeight: 0,
				latitude: 28.687205773173343,
				longitude: 115.8995839881188,
				circles: [{ //集合点
					latitude: '',
					longitude: '',
					// fillColor: "#429FFF", //填充颜色
					// color: "#A7B6CB", //描边的颜色
					// radius: 2, //半径
					// strokeWidth: 2, //描边的宽度
				}, {
					latitude: '',
					longitude: '',
					// fillColor: "#D9E6EF", //填充颜色
					// color: "#A7B6CB", //描边的颜色
					// radius: 10, //半径
					// strokeWidth: 2, //描边的宽度
				}], //圆
				markers: [{ // 集合点
					width: '80',
					height: '80',
					// label: {
					// 	content: "集合点",
					// 	color: "#FE0000",
					// 	fontSize: 24,
					// 	textAlign: "center",
					// },
					id: 1,
					latitude: '',
					longitude: '',
					iconPath: '/static/dinw/location7.png',
				}, {
					width: '50',
					height: '50',
					id: 2,
					latitude: '',
					longitude: '',
					iconPath: '/static/dinw/dinw13.png',
				}], //标记点
					mypolylines: [{ //指定一系列坐标点,从数组第一项连线至最后一项
						points: [],
						color: "#FE0000", //线的颜色
						width: 10, //线的宽度
						dottedLine: false, //是否虚线
						arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
					},
					{ //指定一系列坐标点,从数组第一项连线至最后一项
						points: [],
						color: "#10a4ff", //线的颜色
						width: 10, //线的宽度
						dottedLine: false, //是否虚线
						arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
					},
				],

onload

	uni.getSystemInfo({ //初始化地图高度
				success(res) {
					that.mapHeight = res.windowHeight;
				}
			});
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

轻动琴弦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值