MessageProcess: function (topic, payload) {
let that = this;
console.log(topic + payload);
// 如果接收到了车的主题
if (topic == catAddress) {
//longitude:113.586675,latitude:23.548624
payload = String(payload)
let data = payload.split(",");
let data_1 = String(data[0]).split(":");
let data_2 = String(data[1]).split(":");
let list = this.data.markers;
list[1] = {
iconPath: “…/…/img/catt.png”,
id: 0,
latitude: data_2[1],
longitude: data_1[1],
width: 50,
height: 50
}
that.setData({
latitude: data_2[1],
longitude: data_1[0],
})
that.getCenterLocation();
}
},
里面的catt图片在地图上显示不出来。。