function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"482383","map_x":"114.006661","map_y":"22.975652","pointname":"常平校区","pointaddress":"常平镇板石星汇中心","areaname":"常平镇","areacode":"100044019011"},{"id":"482382","map_x":"113.734973","map_y":"22.984887","pointname":"万江校区","pointaddress":"万江总站万道路道滘方向","areaname":"厚街镇","areacode":"100044019001"},{"id":"482381","map_x":"113.679452","map_y":"22.827528","pointname":"石龙校区","pointaddress":"石龙镇西湖旺角商城","areaname":"石龙镇","areacode":"100044019025"},{"id":"482380","map_x":"114.150015","map_y":"22.753167","pointname":"凤岗校区","pointaddress":"凤岗镇沃尔玛斜对面往清溪方向 200 米拔骏大厦","areaname":"凤岗镇","areacode":"100044019022"},{"id":"482379","map_x":"113.68041","map_y":"22.948972","pointname":"厚街校区","pointaddress":"厚街镇万达广场","areaname":"厚街镇","areacode":"100044019001"},{"id":"482378","map_x":"113.856486","map_y":"22.911551","pointname":"大岭山校区","pointaddress":"大岭山镇教育路","areaname":"大岭山镇","areacode":"100044019008"},{"id":"482377","map_x":"113.890718","map_y":"22.997798","pointname":"寮步校区","pointaddress":"寮步镇电子城塘边天桥塘边公交站","areaname":"寮步镇","areacode":"100044019007"},{"id":"482376","map_x":"113.937906","map_y":"22.937274","pointname":"大朗校区","pointaddress":"大朗镇美景中路","areaname":"大朗镇","areacode":"100044019009"},{"id":"482375","map_x":"114.106871","map_y":"22.821975","pointname":"塘厦校区","pointaddress":"厦镇花园新街","areaname":"塘厦镇","areacode":"100044019018"},{"id":"482374","map_x":"113.804939","map_y":"22.805682","pointname":"长安校区","pointaddress":"长安镇万科中心(万科广场)正对面","areaname":"长安新区","areacode":"100044019032"},{"id":"63908","map_x":"113.66059","map_y":"22.936438","pointname":"虎门校区","pointaddress":"虎门镇龙眼路口顺兴大厦","areaname":"虎门镇","areacode":"100044019031"},]; //补充其他行政区分组 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(); } }