c***@weinde.cn
c***@weinde.cn
  • 发布:2019-04-22 16:44
  • 更新:2021-03-19 17:08
  • 阅读:3097

polyline要怎么显示啊

分类:uni-app

想要显示地图轨迹,但是这么做不显示,哪位能指导,谢谢!
export default {
data() {
return {
title: '计步器',
tranMsg:'',
latitude: 39.909,
longitude: 116.39742,
covers: [{
latitude: 39.909,
longitude: 116.39742,
iconPath: '../../../static/location.png'
}],
polyline:{
points: [
{latitude: 24.50635, longitude: 118.13098},
{latitude: 24.60635, longitude: 118.13098},
{latitude: 24.65635, longitude: 118.13098},
{latitude: 24.72635, longitude: 118.13098},
{latitude: 24.80635, longitude: 118.13098},
{latitude: 24.90635, longitude: 118.13098},
],
color: "#0000AA",
width: 50
}

2019-04-22 16:44 负责人:无 分享
已邀请:
1***@163.com

1***@163.com

polyline  少[]括号

z***@163.com

z***@163.com

that.polylines=[{
points: [
{latitude: 21.79343, longitude: 110.93480},
{latitude: 21.70343, longitude: 110.99480}
],
dottedLine:true,
width:2
}]

华玖

华玖

polyline 是Array类型,写法如下

polyline:[  
    {  
    points: [],  
    color: '#FA0202',  
    width: 2, //   线的宽度    Number  否  
    arrowLine: true,  
    dottedLine: true,                                                                                                     
      }  
],

该问题目前已经被锁定, 无法添加新回复