| | |
| | | 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("您选择地址没有解析到结果!"); |
| | |
| | | } |
| | | |
| | | 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']); |
| | |
| | | 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>"); |