function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"170810","map_x":"113.625999","map_y":"23.121971","pointname":"增城校区","pointaddress":"新塘大道","areaname":"增城市","areacode":"100044001083"},{"id":"170809","map_x":"113.265199","map_y":"23.206655","pointname":"汇侨校区","pointaddress":"新市街","areaname":"白云区","areacode":"100044001011"},{"id":"170808","map_x":"113.284962","map_y":"23.130325","pointname":"杨箕校区","pointaddress":"东泰路","areaname":"越秀区","areacode":"100044001004"},{"id":"170807","map_x":"113.280673","map_y":"23.124328","pointname":"珠光路校区","pointaddress":"珠光路","areaname":"越秀区","areacode":"100044001004"},{"id":"170806","map_x":"113.476168","map_y":"23.112014","pointname":"文冲同创汇校区","pointaddress":"石化路","areaname":"黄埔区","areacode":"100044001012"},{"id":"170805","map_x":"113.459184","map_y":"23.184448","pointname":"金峰广场校区","pointaddress":"联合街道科翔路","areaname":"黄埔区","areacode":"100044001012"},{"id":"170804","map_x":"113.250297","map_y":"23.136285","pointname":"荔京阁校区","pointaddress":"周门路","areaname":"荔湾区","areacode":"100044001003"},{"id":"170803","map_x":"113.248781","map_y":"23.157243","pointname":"越秀·财富大厦校区","pointaddress":"西湾路","areaname":"荔湾区","areacode":"100044001003"},{"id":"170802","map_x":"113.42035","map_y":"23.116359","pointname":"美林湖畔校区","pointaddress":"桃园南一路","areaname":"天河区","areacode":"100044001006"},{"id":"170801","map_x":"113.335996","map_y":"23.126617","pointname":"珠江新城校区","pointaddress":"兴盛路","areaname":"天河区","areacode":"100044001006"},{"id":"170800","map_x":"113.380312","map_y":"23.155482","pointname":"汇景新城校区","pointaddress":"大丰路","areaname":"天河区","areacode":"100044001006"},{"id":"170799","map_x":"113.342937","map_y":"23.143545","pointname":"龙口西校区","pointaddress":"龙口西路","areaname":"天河区","areacode":"100044001006"},{"id":"170798","map_x":"113.409727","map_y":"23.128314","pointname":"天河广场校区","pointaddress":"中山大道","areaname":"天河区","areacode":"100044001006"},{"id":"170797","map_x":"113.395054","map_y":"22.937195","pointname":"番禺广场校区","pointaddress":"万科里","areaname":"番禺区","areacode":"100044001013"},{"id":"170796","map_x":"113.482819","map_y":"22.947515","pointname":"亚运城校区","pointaddress":"石楼镇康体路","areaname":"番禺区","areacode":"100044001013"},{"id":"170795","map_x":"113.353674","map_y":"22.973","pointname":"金山谷校区","pointaddress":"东环街","areaname":"番禺区","areacode":"100044001013"},{"id":"170783","map_x":"113.391563","map_y":"23.02708","pointname":"剑桥郡校区","pointaddress":"南村镇兴南大道","areaname":"番禺区","areacode":"100044001013"},{"id":"170782","map_x":"113.282809","map_y":"23.107976","pointname":"金谷广场校区","pointaddress":"前进路","areaname":"海珠区","areacode":"100044001005"},{"id":"170781","map_x":"113.33455","map_y":"23.107084","pointname":"四季天地校区","pointaddress":"赤岗北路","areaname":"海珠区","areacode":"100044001005"},{"id":"170780","map_x":"113.285419","map_y":"23.087071","pointname":"南珠广场校区","pointaddress":"江燕路与南珠路","areaname":"海珠区","areacode":"100044001005"},{"id":"170779","map_x":"113.296231","map_y":"23.109554","pointname":"滨江东校区","pointaddress":"怡海路","areaname":"海珠区","areacode":"100044001005"},]; //补充其他行政区分组 if(data_info.length>10){ var areaGroupArr=new Array(); var defaultCode=''; for(var i=0;i< data_info.length;i++){ if(data_info[i].id==campusid){ defaultCode=data_info[i].areacode; } var _item=areaGroupArr.find(it=>it.areacode==data_info[i].areacode); if(_item){ _item.count++; }else{ areaGroupArr.push({areacode:data_info[i].areacode,areaname:data_info[i].areaname,count:1,fid:data_info[i].id}); } } $('#areaul li:gt(0)').remove(); for(var i=0;i< areaGroupArr.length;i++){ $('#areaul').append(`
  • ${areaGroupArr[i].areaname}(${areaGroupArr[i].count})
  • `); } } //2023-6-7 简化之前逻辑,对网点列表重新构建数据 var _uls=$('.school-list-container ul'); for(var i=0;i< _uls.length;i++){ var _ul=$(_uls[i]); var _id=_ul.attr('id'); var _code=''; if(/\d+/.test(_id)){ _code=/\d+/.exec(_id)[0]; } _ul.empty(); var _index=0; var visible=_ul.is(':visible'); for(var j=0;j< data_info.length;j++){ if(_code&&data_info[j].areacode!=_code){ continue; } _index++; var _li=`
  • ${_index}${data_info[j].id==campusid?'':''}
    ${data_info[j].pointname} ${data_info[j].pointaddress}
  • `; _ul.append(_li); if(visible){ if(locationPoint && data_info[j].id==campusid){ var overlay = new ComplexCustomOverlay(new BMap.Point(locationPoint.lng, locationPoint.lat), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); map.centerAndZoom(new BMap.Point(locationPoint.lng, locationPoint.lat), 15); }else{ var overlay = new ComplexCustomOverlay(new BMap.Point(data_info[j].map_x, data_info[j].map_y), _index, data_info[j].pointname, data_info[j].pointaddress, data_info[j].id); map.addOverlay(overlay); } } } if(visible){ var _activeTop=_ul.find('li.active').offset().top; var _parentTop=_ul.offset().top; _ul.scrollTop(_activeTop-_parentTop-_ul.find('li.active').outerHeight()); } } resetJybTabLine(); } }