ZhuDongming
2020-04-08 e0c4b15be905f30d6e83025d5a4aca5c7db55a7f
src/main/webapp/js/moralmap.js
@@ -70,6 +70,11 @@
        var myGeo = new BMap.Geocoder();
        myGeo.getPoint(address, function (point) {
            if (point) {
                if ("大同市" == cityName) {
                    var longitude = 113.30640743;
                    var latitude = 40.08256467;
                    var point = new BMap.Point(longitude, latitude);
                }
                map.centerAndZoom(point, showZoom);
            } else {
                alert("您选择地址没有解析到结果!");
@@ -836,10 +841,10 @@
            }
            moralMap.showSensors = function (jsonData) {
                if(!jsonData.hasOwnProperty('mac')){
                if (!jsonData.hasOwnProperty('mac')) {
                    infoWindow.setContent("");
                    infoWindow.redraw();
                }else{
                } else {
                    var adressOutHtml = '<div style="min-height:20px;overflow:auto;max-height:400px;font-size: 12px;" onmouseover="moralMap.clearCloseInfoWindow()" onmouseout="moralMap.closeInfoWindow()">';
                    var y, m, d, h, mm, s;
                    var date = new Date(jsonData['time']);
@@ -861,6 +866,9 @@
                            for (var key in sensorsUnitMap) {
                                if (prop == key) {
                                    var sensorsUnit = sensorsUnitMap[key];
                                    if (sensorsUnit == null) {
                                        sensorsUnit = "";
                                    }
                                }
                            }
                            adressOutHtml += ('<p style="height: 18px;line-height: 18px">' + sensorsDescription + ":" + jsonData[prop] + sensorsUnit + "</p>");