前言
地图基础属性:
一、线聚合
1.wxml
<map id="mapp" latitude="37.48205260" longitude="121.44577861" scale="16" show-compass="true"show-scale="true" polyline="{{polyline}}"> </map>
2.js
Page({ data: { polyline: [{ points: [{ longitude: 121.44577861, latitude: 37.48205260 }, { longitude: 121.44611657, latitude: 37.48207388 }, { longitude: 121.44725382, latitude: 37.48224841 }, { longitude: 121.44766152, latitude: 37.48237186 },{ longitude: 121.4475274100, latitude: 37.4827039000 },{ longitude: 121.44748986, latitude: 37.48299336 },{ longitude: 121.4476454300, latitude: 37.4831679000 },{ longitude: 121.4478063600, latitude: 37.4831381000 },{ longitude: 121.4479565600, latitude: 37.4831295800 },{ longitude: 121.4480263000, latitude: 37.4831636400 },{ longitude: 121.44820869, latitude: 37.48330837 } ], color: "#33c9FFDD", width: 3, dottedLine: true }] } })
3.wxss
#mapp { height: 1000rpx; width: 100%; }
4.实际效果