" + json.title + "
"+json.content+"
"); return iw; } //创建一个Icon function createIcon(json){ var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w,json.h),{imageOffset: new BMap.Size(-json.l,-json.t),infoWindowOffset:new BMap.Size(json.lb+5,1),offset:new BMap.Size(json.x,json.h)}) return icon; } //标注线数组 var plPoints = [{style:"solid",weight:4,color:"#f00",opacity:0.6,points:["114.030413|22.64966","114.031554|22.649443","114.031626|22.648017","114.031635|22.648017"]} ,{style:"solid",weight:4,color:"#f00",opacity:0.6,points:["114.031671|22.647976","114.031671|22.647759","114.031437|22.647742","114.031527|22.647742"]} ]; //向地图中添加线函数 function addPolyline(){ for(var i=0;i