mapContext = wx.createMapContext("map")
mapContext.addGroundOverlay({
id: '1',
src: './../../img/border.png',
bounds: {
southwest: { longitude: 116.46, latitude: 39.92 },
northeast: { longitude: 116.46005, latitude: 39.92005 }
},
success() {
console.log("success")
},
fail(res) {
console.log("fail")
console.log(res)
},
complete() {
console.log("complete")
}
})
官方文档描述是类型是string
ts的声明文件也是string类型
因为用的是ts,直接改成number类型会报错,这个怎么解决。
id:number试一试