|  |  |  | 
|---|
|  |  |  | <textarea id="close" hidden></textarea> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="main_body"> | 
|---|
|  |  |  | <%--<input  id="button" type="button" value="点击" onclick="getJs();">--%> | 
|---|
|  |  |  | <div class="tools_box"> | 
|---|
|  |  |  | <div class="charts_btn"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | //获得消息事件 | 
|---|
|  |  |  | ws.onmessage = function (msg) { | 
|---|
|  |  |  | // $("#searchParam").val(JSON.parse(msg.data)); | 
|---|
|  |  |  | //moralMap.getRoad(JSON.parse(JSON.parse(msg.data)),regionCode); | 
|---|
|  |  |  | moralMap.refreshWindDir(JSON.parse(JSON.parse(msg.data))); | 
|---|
|  |  |  | /*  if (moralMap.showSensors && typeof (moralMap.showSensors) == "function") { | 
|---|
|  |  |  | moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); | 
|---|
|  |  |  | }*/ | 
|---|
|  |  |  | if ($("#close").html() == "CloseMq") { | 
|---|
|  |  |  | ws.close(JSON.parse(msg.data)); | 
|---|
|  |  |  | ws.close(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | moralMap.showSensors(JSON.parse(JSON.parse(msg.data))); | 
|---|
|  |  |  | }; | 
|---|