|  |  |  | 
|---|
|  |  |  | <script type="text/javascript" | 
|---|
|  |  |  | src="http://api.map.baidu.com/api?v=2.0&ak=rER1sgBIcQxkfNSlm2wmBGZGgEERrooM"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="/js/jquery.min.js"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="/js/sockjs.min.js"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="/js/stomp.min.js"></script> | 
|---|
|  |  |  | <script type="text/javascript" src="/js/utils.js"></script> | 
|---|
|  |  |  | <script type="text/javascript"> | 
|---|
|  |  |  | if (typeof (JSON) == 'undefined') { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .tools_box { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | height: 120px; | 
|---|
|  |  |  | width: 400px; | 
|---|
|  |  |  | height: 90px; | 
|---|
|  |  |  | width: 90px; | 
|---|
|  |  |  | right: 1px; | 
|---|
|  |  |  | top: 20px; | 
|---|
|  |  |  | z-index: 1; | 
|---|
|  |  |  | 
|---|
|  |  |  | background: url(/img/charts_btn_bg_2.png) left top no-repeat; | 
|---|
|  |  |  | background-size: 70%; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .wind_explain { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | height: 200px; | 
|---|
|  |  |  | width: 110px; | 
|---|
|  |  |  | right: 1px; | 
|---|
|  |  |  | top: 110px; | 
|---|
|  |  |  | z-index: 1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .wind_explain li { | 
|---|
|  |  |  | height: 25px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .wind_explain li span { | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | height: 25px; | 
|---|
|  |  |  | line-height: 25px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .wind_explain li img { | 
|---|
|  |  |  | vertical-align: top; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  | <div class="main_body"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="charts_btn"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="wind_explain"> | 
|---|
|  |  |  | <ul> | 
|---|
|  |  |  | <li><img src="/img/icoWind01.png" width="25" height="25"><span>1级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind02.png" width="25" height="25"><span>2级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind03.png" width="25" height="25"><span>3级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind04.png" width="25" height="25"><span>4级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind05.png" width="25" height="25"><span>5级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind06.png" width="25" height="25"><span>6级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind07.png" width="25" height="25"><span>7级风</span></li> | 
|---|
|  |  |  | <li><img src="/img/icoWind08.png" width="25" height="25"><span>8级风及以上</span></li> | 
|---|
|  |  |  | </ul> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <%-- <div class="search_box"> | 
|---|
|  |  |  | <button id="searchBtn" type="button">搜索</button> | 
|---|
|  |  |  | <textarea style="width: 200px;height:200px;" id="searchParam"></textarea> | 
|---|
|  |  |  | </div>--%> | 
|---|
|  |  |  | <button id="searchBtn" type="button">搜索</button> | 
|---|
|  |  |  | <textarea style="width: 300px;height:400px;" id="searchParam"></textarea> | 
|---|
|  |  |  | </div>--%> | 
|---|
|  |  |  | <!-- <div id="popup_box"> | 
|---|
|  |  |  | <div id="equ_list" class="listview"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | //页面初始化 | 
|---|
|  |  |  | (function ($) { | 
|---|
|  |  |  | var hostAndPort = document.location.host; | 
|---|
|  |  |  | var moralMap = window.moralMap; | 
|---|
|  |  |  | var params = $.parseJSON($("#mapParams").html()); | 
|---|
|  |  |  | moralMap['params'] = params; | 
|---|
|  |  |  | var orgId = params["orgId"]; | 
|---|
|  |  |  | var regionCode = params["regionCode"]; | 
|---|
|  |  |  | var accountId = params["accountId"]; | 
|---|
|  |  |  | var provinceCode = regionCode.toString().substring(0, 2) + "0000"; | 
|---|
|  |  |  | var mapType = getUrlParam("mapType"); | 
|---|
|  |  |  | var mapOption = {}; | 
|---|
|  |  |  | 
|---|
|  |  |  | function loadOverlays(url, callback) { | 
|---|
|  |  |  | //从缓存取 | 
|---|
|  |  |  | var oldMarkerList = moralMap.getHorizonMarkers(); | 
|---|
|  |  |  | var oldWindMarkerList = moralMap.getHorizonWindMarkers(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | moralMap.addOverlays(oldMarkerList); | 
|---|
|  |  |  | moralMap.addOverlays(oldWindMarkerList); | 
|---|
|  |  |  | //从缓存取 | 
|---|
|  |  |  | //超界到后台取数据,地图为空时取 | 
|---|
|  |  |  | if (moralMap.isOverBounds() || moralMap.getOverlays().length == 0) { | 
|---|
|  |  |  | 
|---|
|  |  |  | alert(equStr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if("国控站"===obj["monitorPoint"]["description"]){ | 
|---|
|  |  |  | var icon05 = new BMap.Icon("/img/ico05.png", new BMap.Size(50, 50)); | 
|---|
|  |  |  | var mark05 = new BMap.Marker(new BMap.Point(obj["monitorPoint"]["longitude"], obj["monitorPoint"]["latitude"]), {icon: icon05}); | 
|---|
|  |  |  | moralMap.addOverlay(mark05); | 
|---|
|  |  |  | }else if("省控站"===obj["monitorPoint"]["description"]){ | 
|---|
|  |  |  | var icon06 = new BMap.Icon("/img/ico06.png", new BMap.Size(50, 50)); | 
|---|
|  |  |  | var mark06 = new BMap.Marker(new BMap.Point(obj["monitorPoint"]["longitude"], obj["monitorPoint"]["latitude"]), {icon: icon06}); | 
|---|
|  |  |  | moralMap.addOverlay(mark06); | 
|---|
|  |  |  | }else if("县控站"===obj["monitorPoint"]["description"]){ | 
|---|
|  |  |  | var icon08 = new BMap.Icon("/img/ico08.png", new BMap.Size(50, 50)); | 
|---|
|  |  |  | var mark08 = new BMap.Marker(new BMap.Point(obj["monitorPoint"]["longitude"], obj["monitorPoint"]["latitude"]), {icon: icon08}); | 
|---|
|  |  |  | moralMap.addOverlay(mark08); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var moralMask = new moralMap.Equipment(obj); | 
|---|
|  |  |  | moralMap.addOverlay(moralMask); | 
|---|
|  |  |  | if (obj['hasWindInfo'] && obj['state'] != 4) { | 
|---|
|  |  |  | var moralDeviceWind = new moralMap.Device(obj); | 
|---|
|  |  |  | moralMap.addOverlay(moralDeviceWind); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | //页面刷新 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var ws; | 
|---|
|  |  |  | if (typeof (WebSocket) === "undefined") { | 
|---|
|  |  |  | alert("您的浏览器不支持WebSocket"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | ws = new WebSocket('ws://' + hostAndPort + '/screen/webSocket/' + orgId + '&' + accountId + '_' + regionCode); | 
|---|
|  |  |  | ws.onopen = function () { | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获得消息事件 | 
|---|
|  |  |  | ws.onmessage = function (msg) { | 
|---|
|  |  |  | // $("#searchParam").val(JSON.parse(msg.data)); | 
|---|
|  |  |  | moralMap.refreshWindDir(JSON.parse(JSON.parse(msg.data))); | 
|---|
|  |  |  | /*  if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") { | 
|---|
|  |  |  | moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); | 
|---|
|  |  |  | }*/ | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //关闭事件 | 
|---|
|  |  |  | ws.onclose = function () { | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | //发生了错误事件 | 
|---|
|  |  |  | ws.onerror = function () { | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | })(jQuery); | 
|---|
|  |  |  | var _intervalNum = -1; | 
|---|