1.5版本,map组件,官方文档的demo报错,1.4正常
发布于 4 年前 作者 rcai 18095 次浏览 来自 问答

如题~~~~~~~~~~~~

<map id="map" longitude="113.324520" latitude="23.099994" scale="14"  bindcontroltap="controltap" markers="{{markers}}" bindmarkertap="markertap" polyline="{{polyline}}" bindregionchange="regionchange" show-location style="width: 100%; height: 300px;"></map>
Page({
data: {
markers: [{
iconPath: "/images/index/point.png",
id: 0,
latitude: 23.099994,
longitude: 113.324520,
width: 50,
height: 50
       }],
polyline: [{
points: [{
longitude: 113.3245211,
latitude: 23.10229
           }, {
longitude: 113.324520,
latitude: 23.21229
           }],
color:"#FF0000DD",
width: 2,
dottedLine: true
       }],
},
regionchange(e) {
console.log(e.type)
},
markertap(e) {
console.log(e.markerId)
},
controltap(e) {
console.log(e.controlId)
}
})
1 回复

你好,报的什么错误?

回到顶部