function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"314709","map_x":"118.757069","map_y":"32.067357","pointname":"南艺校区","pointaddress":"鼓楼区石头城99号南艺后街","areaname":"鼓楼区","areacode":"100032001006"},{"id":"314708","map_x":"118.731268","map_y":"32.014363","pointname":"奥体中心","pointaddress":"建邺区江东中路222号","areaname":"建邺区","areacode":"100032001005"},{"id":"314707","map_x":"118.843385","map_y":"31.929448","pointname":"江宁滨河体育公园","pointaddress":"江宁区淮浦路以东秦淮河以西","areaname":"江宁区","areacode":"100032001015"},{"id":"314706","map_x":"118.812184","map_y":"31.92566","pointname":"拓博足球学院爱涛校区","pointaddress":"江宁区颐和西苑","areaname":"江宁区","areacode":"100032001015"},{"id":"314705","map_x":"118.669577","map_y":"31.912662","pointname":"金地体育公园","pointaddress":"雨花台区自在城小区","areaname":"雨花台区","areacode":"100032001014"},{"id":"314704","map_x":"118.950391","map_y":"32.119962","pointname":"羊山公园","pointaddress":"栖霞区羊山北路18号","areaname":"栖霞区","areacode":"100032001013"},{"id":"314703","map_x":"118.830443","map_y":"32.036696","pointname":"月牙湖公园","pointaddress":"秦淮区后标营路164号","areaname":"秦淮区","areacode":"100032001004"},{"id":"314702","map_x":"118.830406","map_y":"32.118544","pointname":"迈皋桥校区","pointaddress":"栖霞区迈皋桥街道迈化路376号","areaname":"栖霞区","areacode":"100032001013"},{"id":"314701","map_x":"118.803367","map_y":"31.997424","pointname":"紫云智慧广场","pointaddress":"秦淮区卡子门大街19号","areaname":"秦淮区","areacode":"100032001004"},]; //补充其他行政区分组 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(); } }