微信小程序地图划线,,,是小程序很基本的功效,,,那么小程序地图划线要怎么实现呢。。。。。

var point = []
var that2
function drawline() {
that2.setData({
polyline: [{
points: point,
color: "#99FF00",
width: 4,
dottedLine: false
}],
})
}
//获取经纬度
function getlocation() {
var latitude1, longitude1
wx.getLocation({
type: 'gcj02',
success: function (res) {
latitude1 = res.latitude
longitude1 = res.longitude
point.push({latitude:latitude1, longitude:longitude1})
console.log(point)
}
})
}
Page({
data: {
polyline: []
},
onReady: function () {
that2 = this
wx.getLocation({
type: 'gcj02',
success: function (res) {
that2.setData({
long: res.longitude,
lat: res.latitude
})
}
})
},
start:function(){
this.timer=setInterval(repeat, 10000);
function repeat() {
console.log("re")
getlocation()
drawline()
}
},
end: function () {
console.log("clear")
clearInterval(this.timer)
}
})
KESION pp电子软件
KESION pp电子软件是海内领先的在线教育软件及私域社交电商软件服务提供商,,,恒久专注于为企业提供在线教育软件及社交电商SaaS平台解决方案。。。。。
公司焦点产品云开店SaaS社交电商服务平台、在线教育SaaS服务平台、教育企业数字化SaaS云平台、企微营销助手、私有化自力安排品牌网校和在线教育咨询等。。。。。KESION 一直通过手艺立异,,,提供产品和服务,,,助力企业向数字化转型,,,通过科技驱动商业刷新,,,让商业变得更智慧!
小程序挪用第三方地图api需要怎样实现,,,下面是详细的实现方法:...
WXS 主要有 3 种注释的要领。。。。。 以下为各人划分介绍是哪三种要领...