|  |  |  | 
|---|
|  |  |  | padding: 0; | 
|---|
|  |  |  | list-style: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_top { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_center { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_bubble_title { | 
|---|
|  |  |  | color: white; | 
|---|
|  |  |  | padding: 0 5px 0 5px; | 
|---|
|  |  |  | background-color: #2DA0EB; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_bubble_content { | 
|---|
|  |  |  | background-color: white; | 
|---|
|  |  |  | padding: 5px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop > img { | 
|---|
|  |  |  | top: 42px !important; | 
|---|
|  |  |  | margin-left: -10px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop div:nth-child(1) div { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop div:nth-child(3) { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop div:nth-child(5) { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop div:nth-child(7) { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .BMap_pop div:nth-child(9) { | 
|---|
|  |  |  | top: 35px !important; | 
|---|
|  |  |  | border-radius: 5px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  | 
|---|
|  |  |  | var weatherInfoToday = params["weatherInfoToday"]; | 
|---|
|  |  |  | var weatherInfoForecast = params["weatherInfoForecast"]; | 
|---|
|  |  |  | var isToday = params["isToday"]; | 
|---|
|  |  |  | console.log(weatherInfoToday); | 
|---|
|  |  |  | console.log(weatherInfoForecast); | 
|---|
|  |  |  | console.log(isToday); | 
|---|
|  |  |  | var month = params["month"]; | 
|---|
|  |  |  | var device = params["device"]; | 
|---|
|  |  |  | var cityName = params["weatherInfoToday"]["cityName"]; | 
|---|
|  |  |  | var map = new BMap.Map("mapCanvas", {enableMapClick: false}); | 
|---|
|  |  |  | 
|---|
|  |  |  | var w = new BMap.Point(sw.lng, latitude); | 
|---|
|  |  |  | var e = new BMap.Point(ne.lng, latitude); | 
|---|
|  |  |  | var dirPoint; | 
|---|
|  |  |  | var humidity; | 
|---|
|  |  |  | var windLevel; | 
|---|
|  |  |  | if (Object.keys(weatherInfoForecast).length === 0) { | 
|---|
|  |  |  | var windDir = weatherInfoToday["windDir"]; | 
|---|
|  |  |  | dirPoint = getWindDir(windDir, dirPoint); | 
|---|
|  |  |  | humidity = weatherInfoToday["humidity"]; | 
|---|
|  |  |  | windLevel = weatherInfoToday["windLevel"]; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (isToday) { | 
|---|
|  |  |  | var windDir = weatherInfoToday["windDir"]; | 
|---|
|  |  |  | dirPoint = getWindDir(windDir, dirPoint); | 
|---|
|  |  |  | humidity = weatherInfoToday["humidity"]; | 
|---|
|  |  |  | windLevel = weatherInfoToday["windLevel"]; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | var windDir = weatherInfoForecast["windDirDay"]; | 
|---|
|  |  |  | dirPoint = getWindDir(windDir, dirPoint); | 
|---|
|  |  |  | humidity = weatherInfoForecast["humidity"]; | 
|---|
|  |  |  | windLevel = weatherInfoForecast["windLevelDay"]; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var polyline = new BMap.Polyline([ | 
|---|
|  |  |  | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | map.addOverlay(polyline);// 画两点间线 | 
|---|
|  |  |  | addArrow(polyline, 50, Math.PI / 7); | 
|---|
|  |  |  | var winfowTextCause = "<p style='height: 44px;line-height: 22px'>汽车尾气,工厂废气,以及周边地区农田秸秆焚烧,污染传播途径是根据风向来做出调整</p>"; | 
|---|
|  |  |  | var winfowTextSource; | 
|---|
|  |  |  | var supplement; | 
|---|
|  |  |  | if (month == 12 || month == 1 || month == 2) { | 
|---|
|  |  |  | if (humidity > 60 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过60%,平均风速小于2m/s,高温、湿度较大,大气扩散条件较不利"; | 
|---|
|  |  |  | } else if (humidity > 80 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过80%,平均风速降低,在高湿、小风条件下,污染物易于累积和吸湿增长,促使污染二次生成"; | 
|---|
|  |  |  | } else if (windLevel > 2) { | 
|---|
|  |  |  | supplement = ",但风速较大,大气扩散条件较有利,空气质量相对提升"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | supplement = ",但湿度较低,大气扩散条件较有利"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | winfowTextSource = "<p style='height: 22px;line-height: 22px'>压强升高气温降低,也会因冷空气带来的颗粒物,导致污染上升" + supplement + "</p>"; | 
|---|
|  |  |  | } else if (month == 3 || month == 4 || month == 5) { | 
|---|
|  |  |  | if (humidity > 60 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过60%,平均风速小于2m/s,高温、湿度较大,大气扩散条件较不利"; | 
|---|
|  |  |  | } else if (humidity > 80 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过80%,平均风速降低,在高湿、小风条件下,污染物易于累积和吸湿增长,促使污染二次生成"; | 
|---|
|  |  |  | } else if (windLevel >= 2) { | 
|---|
|  |  |  | supplement = ",同时风速较大,大气扩散条件较有利,空气质量相对提升"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | supplement = ",同时湿度较低,大气扩散条件较有利"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | winfowTextSource = "<p style='height: 22px;line-height: 22px'>地面逆温频率的增加使污染物在近地层不断积累" + supplement + "</p>"; | 
|---|
|  |  |  | } else if (month == 6 || month == 7) { | 
|---|
|  |  |  | if (humidity > 60 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过60%,平均风速小于2m/s,高温、湿度较大,大气扩散条件较不利"; | 
|---|
|  |  |  | } else if (humidity > 80 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过80%,平均风速降低,在高湿、小风条件下,污染物易于累积和吸湿增长,促使污染二次生成"; | 
|---|
|  |  |  | } else if (windLevel > 2) { | 
|---|
|  |  |  | supplement = ",同时风速较大,大气扩散条件较有利,空气质量相对提升"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | supplement = ",同时湿度较低,大气扩散条件较有利"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | winfowTextSource = "<p style='height: 22px;line-height: 22px'>夏季的气温条件不易发生逆温" + supplement + "</p>"; | 
|---|
|  |  |  | } else if (month == 8 || month == 9 || month == 10 || month == 11) { | 
|---|
|  |  |  | if (humidity > 60 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过60%,平均风速小于2m/s,高温、湿度较大,大气扩散条件较不利"; | 
|---|
|  |  |  | } else if (humidity > 80 && windLevel < 2) { | 
|---|
|  |  |  | supplement = ",同时相对湿度超过80%,平均风速降低,在高湿、小风条件下,污染物易于累积和吸湿增长,促使污染二次生成"; | 
|---|
|  |  |  | } else if (windLevel > 2) { | 
|---|
|  |  |  | supplement = ",同时风速较大,大气扩散条件较有利,空气质量相对提升"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | supplement = ",同时湿度较低,大气扩散条件较有利"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | winfowTextSource = "<p style='height: 22px;line-height: 22px'>太阳辐射强,大气氧化性增强,常发生光化学烟雾" + supplement + "</p>"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var winfowText = | 
|---|
|  |  |  | '<div style="min-height:20px;overflow:auto;max-height:330px;" >'; | 
|---|
|  |  |  | var winfowText = '<div style="height:150px;" >'; | 
|---|
|  |  |  | var opts = { | 
|---|
|  |  |  | width: 220, | 
|---|
|  |  |  | height: 220, | 
|---|
|  |  |  | width: 380, | 
|---|
|  |  |  | title: '<h3>污染分析</h3>', | 
|---|
|  |  |  | enableMessage: false //设置允许信息窗发送短息 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | winfowText += ("<p style='height: 22px;line-height: 22px'></p>"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | winfowText += '<h3 style="background-color: #CD5C5C;color:white;margin-bottom: 1px">污染来源</h3>'; | 
|---|
|  |  |  | winfowText += winfowTextCause; | 
|---|
|  |  |  | winfowText += '<h3 style="background-color: #66CD00;color:white;margin-bottom: 1px">污染成因</h3>'; | 
|---|
|  |  |  | winfowText += winfowTextSource; | 
|---|
|  |  |  | winfowText += "</div>"; | 
|---|
|  |  |  | marker.addEventListener("click", function () { | 
|---|
|  |  |  | var infoWindow = new BMap.InfoWindow(winfowText, opts); | 
|---|