From c476e03205029771446bf723c71ccf9f04f0ef10 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Fri, 25 Sep 2020 16:52:48 +0800
Subject: [PATCH] BS获取风向以及站点信息Webscoket接口

---
 src/main/webapp/js/newmoralmap.js |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/main/webapp/js/newmoralmap.js b/src/main/webapp/js/newmoralmap.js
index 1ce953b..b8e706f 100644
--- a/src/main/webapp/js/newmoralmap.js
+++ b/src/main/webapp/js/newmoralmap.js
@@ -218,6 +218,10 @@
                     var longitude = 106.638135;
                     var latitude = 29.709625;
                     point = new BMap.Point(longitude, latitude);
+                }else if("���������" == regoinNames[2]){
+                    var longitude = 120.332826;
+                    var latitude = 33.772274;
+                    point = new BMap.Point(longitude, latitude);
                 }
                 map.centerAndZoom(point, showZoom);
             } else {
@@ -648,15 +652,6 @@
     moralMap.MoralMarker = function (option) {
         var _option = option;
         var _pointObj = new BMap.Point(_option['longitude'], _option['latitude']);
-        if (_option["description"]=="���������"){
-            _option["state"]="5";
-        }
-        if (_option["description"]=="���������"){
-            _option["state"]="6";
-        }
-        if (_option["description"]=="���������"){
-            _option["state"]="8";
-        }
         var _iconObj = _getMapIcon(_option["state"]);
         this._point = _pointObj;
 
@@ -1127,6 +1122,19 @@
                         if (longitude < bounds.northeastLng && longitude > bounds.southwestLng && latitude < bounds.northeastLat && latitude > bounds.southwestLat) {
                             markers.push(oldmarker);
                         }
+                        if("���������"===option["monitorPoint"]["description"]){
+                            var icon05 = new BMap.Icon("/img/ico05.png", new BMap.Size(50, 50));
+                            var mark05 = new BMap.Marker(new BMap.Point(option["monitorPoint"]["longitude"], option["monitorPoint"]["latitude"]), {icon: icon05});
+                            markers.push(mark05);
+                        }else if("���������"===option["monitorPoint"]["description"]){
+                            var icon06 = new BMap.Icon("/img/ico06.png", new BMap.Size(50, 50));
+                            var mark06 = new BMap.Marker(new BMap.Point(option["monitorPoint"]["longitude"], option["monitorPoint"]["latitude"]), {icon: icon06});
+                            markers.push(mark06);
+                        }else if("���������"===option["monitorPoint"]["description"]){
+                            var icon08 = new BMap.Icon("/img/ico08.png", new BMap.Size(50, 50));
+                            var mark08 = new BMap.Marker(new BMap.Point(option["monitorPoint"]["longitude"], option["monitorPoint"]["latitude"]), {icon: icon08});
+                            markers.push(mark08);
+                        }
                     }
                 }
             }

--
Gitblit v1.8.0