function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"8650","map_x":"113.372147","map_y":"22.950615","pointname":"番禺总校","pointaddress":"市桥大北路189号","areaname":"番禺区","areacode":"100044001013"},{"id":"111653","map_x":"113.341512","map_y":"23.138541","pointname":"天河校区","pointaddress":"天河路490号","areaname":"天河区","areacode":"100044001006"},{"id":"111652","map_x":"113.325727","map_y":"23.101539","pointname":"海珠校区","pointaddress":"新港中路艺影街11号","areaname":"海珠区","areacode":"100044001005"},{"id":"111651","map_x":"113.270536","map_y":"23.201117","pointname":"白云校区","pointaddress":"新市机场路1438号","areaname":"白云区","areacode":"100044001011"},{"id":"111650","map_x":"113.217012","map_y":"23.388645","pointname":"花都校区","pointaddress":"新华街云山大道31号","areaname":"花都区","areacode":"100044001014"},{"id":"8646","map_x":"113.324246","map_y":"23.139309","pointname":"南沙校区","pointaddress":"进港大道56号","areaname":"南沙区","areacode":"100044001001"},{"id":"8649","map_x":"113.378204","map_y":"22.944872","pointname":"隆基校区","pointaddress":"市桥平康路16号","areaname":"番禺区","areacode":"100044001013"},{"id":"111649","map_x":"113.368916","map_y":"22.955465","pointname":"陈文卫中小学辅导中心","pointaddress":"市桥街富华中路12号","areaname":"番禺区","areacode":"100044001013"},{"id":"8647","map_x":"113.321084","map_y":"23.027961","pointname":"大石校区","pointaddress":"大石大涌路76号","areaname":"番禺区","areacode":"100044001013"},{"id":"8648","map_x":"113.374592","map_y":"22.943458","pointname":"银座校区","pointaddress":"市桥桥东路63号","areaname":"番禺区","areacode":"100044001013"},]; //补充其他行政区分组 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(); } }