高德地圖座標點點選彈出框
阿新 • • 發佈:2018-11-30
this.pointSimplifierIns.on('pointClick pointMouseover pointMouseout', function(e, record) {
if(e.type === 'pointClick'){
//alert(111);
//console.log(record.data.data);
//console.log(record.data.position);
var info = [];
info.push("<div><div><img style=\"float:left;\" src=\" http://webapi.amap.com/images/autonavi.png \"/></div> ");
info.push("<div style=\"padding:0px 0px 0px 4px;\"><b>高德軟體</b>");
info.push("電話 : 010-84107000 郵編 : 100102");
info.push("地址 :北京市朝陽區望京阜榮街10號首開廣場4層</div></div>");
infoWindow = new AMap.InfoWindow({
content: info.join("<br/>") //使用預設資訊窗體框樣式,顯示資訊內容
});
infoWindow.open(ths.map, ths.map.getCenter());
}
});
http://www.yejianwu.cn/?p=366