前臺: ? $.ajax({ ???????????????
url: "./Default.aspx", ???????????????
type: "POST", ???????????????
contentType: 'charset=utf-8', ???????????????
success: function (data) {???????????????????
?if (data = !null) { ???????????????????????
$.each(data, function (i, item) { ???????????????????????????
var spotSelected = new BMap.Point(item.Point); ???????????????????????????
var labelMarker = new BMap.Marker(spotSelected, { icon: myIcon });? // 創(chuàng)建10個標(biāo)注 ???????????????????????????
mymap.addOverlay(labelMarker); ???????????????????????????
var opts = { offset: new BMap.Size(0, -25),?title: '<a style="text-decoration:none;color:#2679BA" ??}; ???????????????????????????
var infoWindow1 = new BMap.InfoWindow("<div style='line-height:1.8em;font-size:12px;'><b>地址:</b>item.Address</br><b>電話:</b></br></div>", opts); ???????????????????????
}); ???????????????????
} ???????????????
} ???????????
}); ???????
}
后臺: ?
List<Company> xml = new XmlHelper().SetEntity(HttpContext.Current.Server.MapPath("XMLFile1.xml")); ???????????
return xml;
問題:item為空。
????? 還有data為一堆頁面代碼
- 8 回答
- 0 關(guān)注
- 397 瀏覽
添加回答
舉報
0/150
提交
取消