ZhuDongming
2020-06-30 67a7a24b47d71dd843dd0b17c5cdf9f519e29d5d
src/main/webapp/js/newmoralmap.js
@@ -705,10 +705,10 @@
        function _getWindIcon(speedLevel) {
            speedLevel = speedLevel == null ? 0 : speedLevel;
            var icon = _option["icon"];
            var url = icon["url"] + speedLevel + ".png";
            return new BMap.Icon(url, new BMap.Size(icon["width"], icon["height"]), {
                imageSize: new BMap.Size(icon["width"], icon["height"])
            var windIcon = _option["windIcon"];
            var windUrl = windIcon["url"] + speedLevel + ".png";
            return new BMap.Icon(windUrl, new BMap.Size(windIcon["width"], windIcon["height"]), {
                imageSize: new BMap.Size(windIcon["width"], windIcon["height"])
            });
        }
@@ -743,13 +743,14 @@
                    } else if (windSpeed > 17.1) {
                        speedLevel = 8;
                    }
                }
                if (speedLevel == 0) {
                    moralMap.removeOverlay(this);
                } else {
                    var iconObj = _getWindIcon(speedLevel);
                    this.setIcon(iconObj);
                    this.setRotation(windDir);
                    if (speedLevel == 0) {
                        moralMap.removeOverlay(this);
                    } else {
                        moralMap.addOverlay(this);
                        var iconObj = _getWindIcon(speedLevel);
                        this.setIcon(iconObj);
                        this.setRotation(windDir);
                    }
                }
            },
            getOption: function () {
@@ -845,7 +846,7 @@
    var sensorsDescriptionMap;
    var sensorsUnitMap;
    $.ajax({
        url: "getSensorsMap",
        url: "getSensorsAllMap",
        type: "get",
        dataType: "json",
        success: function (data) {
@@ -863,11 +864,11 @@
                }
            }
        }
        var icon = {};
        icon["url"] = "/img/icoWind0";
        icon["width"] = 25;
        icon["height"] = 25;
        option["icon"] = icon;
        var windIcon = {};
        windIcon["url"] = "/img/icoWind0";
        windIcon["width"] = 25;
        windIcon["height"] = 25;
        option["windIcon"] = windIcon;
        var windMarker = new moralMap.WindMarker(option, moralMap);
        moralMap.putDevice(option['mac'], windMarker);
        var refreshWindMarker = windMarker.refreshWindDir;