function loadother(){ if(typeof(campusid) != "undefined" && !isNaN(campusid)) { var data_info = [{"id":"99407","map_x":"118.125812","map_y":"24.514028","pointname":"塘边校区","pointaddress":"凯兴路","areaname":"湖里区","areacode":"100035002006"},{"id":"99193","map_x":"118.088546","map_y":"24.499002","pointname":"牛头山校区","pointaddress":"东渡路","areaname":"湖里区","areacode":"100035002006"},{"id":"90721","map_x":"118.171807","map_y":"24.537614","pointname":"湖里校区","pointaddress":"禾山街道钟宅路","areaname":"湖里区","areacode":"100035002006"},{"id":"71329","map_x":"118.084672","map_y":"24.460706","pointname":"南中广场校区","pointaddress":"思明西路51号","areaname":"思明区","areacode":"100035002003"},{"id":"71330","map_x":"118.114386","map_y":"24.492097","pointname":"体育中心校区","pointaddress":"体育路2号","areaname":"思明区","areacode":"100035002003"},{"id":"71331","map_x":"118.114726","map_y":"24.496719","pointname":"文化艺术中心校区","pointaddress":"体育路95号","areaname":"思明区","areacode":"100035002003"},]; //补充其他行政区分组 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(`