|  |  |  | 
|---|
|  |  |  | var maxBounds = moralMap.getMaxBounds(); | 
|---|
|  |  |  | var paramMap = {}; | 
|---|
|  |  |  | paramMap["orgId"]=  params['orgId']; | 
|---|
|  |  |  | $.extend(paramMap,maxBounds); | 
|---|
|  |  |  | // 为了适配旧接口 | 
|---|
|  |  |  | paramMap["Fe"]=  maxBounds.northeastLat;//东北角纬度,大一点 | 
|---|
|  |  |  | paramMap["Ge"]=  maxBounds.northeastLng;//东北角经度,大一点 | 
|---|
|  |  |  | paramMap["Ke"]=  maxBounds.southwestLat;//西北角纬度坐标,小一点 | 
|---|
|  |  |  | paramMap["Le"]=  maxBounds.southwestLng;//西北角经度坐标,小一点 | 
|---|
|  |  |  | // $.extend(paramMap,maxBounds); | 
|---|
|  |  |  | loadLazy(url,paramMap,callback); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | var bounds = moralMap.getBounds(); | 
|---|
|  |  |  | paramMap["areaCode"]=  params['areaCode']; | 
|---|
|  |  |  | paramMap["orgId"]=  params['orgId']; | 
|---|
|  |  |  | paramMap["Fe"]=  bounds['Fe'];//东北角纬度,大一点 | 
|---|
|  |  |  | paramMap["Ge"]=  bounds['Ge'];//东北角经度,大一点 | 
|---|
|  |  |  | paramMap["Ke"]=  bounds['Ke'];//西北角纬度坐标,小一点 | 
|---|
|  |  |  | paramMap["Le"]=  bounds['Le'];//西北角经度坐标,小一点 | 
|---|
|  |  |  | // 为了适配旧接口 | 
|---|
|  |  |  | paramMap["Fe"]=  bounds.northeastLat;//东北角纬度,大一点 | 
|---|
|  |  |  | paramMap["Ge"]=  bounds.northeastLng;//东北角经度,大一点 | 
|---|
|  |  |  | paramMap["Ke"]=  bounds.southwestLat;//西北角纬度坐标,小一点 | 
|---|
|  |  |  | paramMap["Le"]=  bounds.southwestLng;//西北角经度坐标,小一点 | 
|---|
|  |  |  | loadLazy("getMonitorpointList",paramMap,addOverMpoints); | 
|---|
|  |  |  | startRefreshPage(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | 
|---|
|  |  |  | parma["markerKeys"] = markerKeys; | 
|---|
|  |  |  | parma["areaCode"] = moralMap['params']["areaCode"]; | 
|---|
|  |  |  | parma["orgId"] = moralMap['params']["orgId"]; | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "post", | 
|---|
|  |  |  | url: "get-real-state-data", | 
|---|
|  |  |  | data:JSON.stringify(parma), | 
|---|
|  |  |  | dataType:"json", | 
|---|
|  |  |  | contentType:"application/json;charset=utf-8", | 
|---|
|  |  |  | cache: false, | 
|---|
|  |  |  | async: true, | 
|---|
|  |  |  | success: function(data) { | 
|---|
|  |  |  | if(data!=null&&typeof data === 'object') { | 
|---|
|  |  |  | var resultMap = data["extData"]; | 
|---|
|  |  |  | if(resultMap==null){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var markers = resultMap["markers"]; | 
|---|
|  |  |  | var layer = resultMap["layer"]; | 
|---|
|  |  |  | if(markers!=null&&markers.length>0){ | 
|---|
|  |  |  | if(layer=="monitorpoints"){ | 
|---|
|  |  |  | for(var a_i in markers){ | 
|---|
|  |  |  | var marker = markers[a_i]; | 
|---|
|  |  |  | var marker_id = marker["id"]; | 
|---|
|  |  |  | var mpoint = moralMap.getMpoint(marker_id); | 
|---|
|  |  |  | if(mpoint!=null){ | 
|---|
|  |  |  | mpoint.refreshState(marker["state"]); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if((!!parma["popupEquMacs"]&&!!parma["popupEquMacs"].length) | 
|---|
|  |  |  | ||(!!parma["markerKeys"]&&!!parma["markerKeys"].length)){ | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | type: "post", | 
|---|
|  |  |  | url: "get-real-state-data", | 
|---|
|  |  |  | data:JSON.stringify(parma), | 
|---|
|  |  |  | dataType:"json", | 
|---|
|  |  |  | contentType:"application/json;charset=utf-8", | 
|---|
|  |  |  | cache: false, | 
|---|
|  |  |  | async: true, | 
|---|
|  |  |  | success: function(data) { | 
|---|
|  |  |  | if(data!=null&&typeof data === 'object') { | 
|---|
|  |  |  | var resultMap = data["extData"]; | 
|---|
|  |  |  | if(resultMap==null){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var markers = resultMap["markers"]; | 
|---|
|  |  |  | var layer = resultMap["layer"]; | 
|---|
|  |  |  | if(markers!=null&&markers.length>0){ | 
|---|
|  |  |  | if(layer=="monitorpoints"){ | 
|---|
|  |  |  | for(var a_i in markers){ | 
|---|
|  |  |  | var marker = markers[a_i]; | 
|---|
|  |  |  | var marker_id = marker["id"]; | 
|---|
|  |  |  | var mpoint = moralMap.getMpoint(marker_id); | 
|---|
|  |  |  | if(mpoint!=null){ | 
|---|
|  |  |  | mpoint.refreshState(marker["state"]); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //                           mpoint.refreshState(4); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | for(var b_i in markers){ | 
|---|
|  |  |  | var marker = markers[b_i]; | 
|---|
|  |  |  | var marker_mac = marker["mac"]; | 
|---|
|  |  |  | var equipment = moralMap.getEquipment(marker_mac); | 
|---|
|  |  |  | if(equipment!=null){ | 
|---|
|  |  |  | equipment.refreshState(marker); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(resultMap["popupEquStates"]!=null){ | 
|---|
|  |  |  | listView.refreshState(resultMap["popupEquStates"]); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | for(var b_i in markers){ | 
|---|
|  |  |  | var marker = markers[b_i]; | 
|---|
|  |  |  | var marker_mac = marker["mac"]; | 
|---|
|  |  |  | var equipment = moralMap.getEquipment(marker_mac); | 
|---|
|  |  |  | if(equipment!=null){ | 
|---|
|  |  |  | equipment.refreshState(marker); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(resultMap["popupEquStates"]!=null){ | 
|---|
|  |  |  | listView.refreshState(resultMap["popupEquStates"]); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|