//正常情况
{
iconPath: “/images/store.png”,
id: 4,
latitude: 22.489344,
longitude: 113.916919,
width: 30,
height: 30,
callout: {
content: “姓名字:李龙\n电话:11223344550\n地址:深圳市龙华新区创业大厦”,
color: “#000”,
id: 3,
fontSize: 14,
borderRadius: 3,
bgColor: “#ffffff”,
padding: 10,
display: “BYCLICK”,
textAlign: “left”
},
label: {
content: “”
}
}
//异常情况
for (var i = 0; i < list.length; i++) {
fieldArr.push({});
fieldArr[i].iconPath = “/images/grower.png”;
fieldArr[i].id = i;
fieldArr[i].latitude = list[i].lat;
fieldArr[i].longitude = list[i].lng;
fieldArr[i].width = 30;
fieldArr[i].height = 30;
fieldArr[i].callout = {
content: “”,
color: “#000000”,
id: i,
fontSize: 14,
borderRadius: 3,
bgColor: “#ffffff”,
padding: 10,
display: “BYCLICK”,
textAlign: “left”
};
calllout.content = “微信名字:” + list[i].userName + “\n电话:” + list[i].tel + “\n点击查看最新一条种植记录”;
fieldArr[i].label = {
content: “”
}
}
我就用个循环填充数据,结构就报错,我结构有问题啊吗,我的天,