Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>OpenWeatherMap. Forecast for Saint Paul </title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="keywords" content="weather, world, Openstreetmap, weather, layer" />
- <meta name="description" content="Current weather conditions in cities for world wide" />
- <meta name="domain" content="OpenWeatherMap.org" />
- <meta http-equiv="pragma" content="no-cache" />
- <meta http-equiv="Expires" content="-1" />
- <link rel="shortcut icon" href="/images/sun_mini.png" />
- <link rel="apple-touch-icon" href="/images/sun_mini.png" />
- <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
- <!--[if lt IE 9]>
- <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
- <![endif]-->
- <script src="/js/jquery-1.7.2.min.js" ></script>
- <script src="/js/jquery-ui.js" ></script>
- <script src="/js/bootstrap-tab.js" ></script>
- <script src="/js/bootstrap-alert.js" ></script>
- <script src="/js/bootstrap-carousel.js" ></script>
- <link href="/stylesheets/bootstrap.css" rel="stylesheet">
- <link href="/stylesheets/toggle-switch.css" rel="stylesheet">
- <link href="/stylesheets/main.css" rel="stylesheet">
- <style type="text/css">
- body {
- padding-top: 60px;
- }
- #map-container {
- padding: 6px;
- border-width: 1px;
- border-style: solid;
- border-color: #ccc #ccc #999 #ccc;
- -webkit-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
- -moz-box-shadow: rgba(64, 64, 64, 0.5) 0 2px 5px;
- box-shadow: rgba(64, 64, 64, 0.1) 0 2px 5px;
- width: 100%;
- }
- .olControlLayerSwitcher .layersDiv {
- background-color:#575757 !important;
- /* for IE */
- filter:alpha(opacity=90);
- /* CSS3 standard */
- opacity:0.9;
- border-radius: 4px;
- color: white;
- font-family: sans-serif;
- font-size: smaller;
- font-weight: bold;
- }
- .olControlAttribution {
- background: #575757;
- color: white;
- z-index:1000;
- font-size: 1em;
- text-align: left;
- position: absolute;
- right: 3px;
- bottom: 0.2em;
- padding: 4px;
- /* for IE */
- filter:alpha(opacity=90);
- /* CSS3 standard */
- opacity:0.9;
- border-radius: 4px;
- }
- /*hack*/
- .olButton {
- color: white;
- font-family: arial;
- display: inline;
- }
- </style>
- <script type="text/javascript">
- function ShowSuccessMess(mess)
- {
- var html = '<div class="alert alert-success" ><a class="close" data-dismiss="alert" href="#">×</a>'+mess+'</div>';
- $("#alert_body").html(html);
- }
- function ShowInfoMess(mess)
- {
- var html = '<div class="alert alert-info" ><a class="close" data-dismiss="alert" href="#">×</a>'+mess+'</div>';
- $("#alert_body").html(html);
- }
- function ShowAlertMess(mess)
- {
- var html = '<div class="alert alert-error" ><a class="close" data-dismiss="alert" href="#">×</a>'+mess+'</div>';
- $("#alert_body").html(html);
- }
- function errorHandler(e)
- {
- ShowAlertMess(e.status +' '+e.statusText);
- }
- function ParseJson(JSONtext)
- {
- try{
- JSONobject = JSON.parse(JSONtext);
- }catch(e){
- ShowAlertMess('Error JSON');
- return;
- }
- if(JSONobject.cod != '200') {
- ShowAlertMess('Error '+ JSONobject.cod + ' ('+ JSONobject.message +')');
- return;
- }
- var mes = JSONobject.cod;
- if(JSONobject.calctime)
- mes = mes + ' ' + JSONobject.calctime;
- if(JSONobject.message)
- mes = mes + ' ' + JSONobject.message;
- console.log( mes );
- return JSONobject;
- }
- function ShowCalcTime(mess)
- {
- console.log( mess );
- }
- function set_cookie(name, value, expires)
- {
- if (!expires)
- {
- expires = new Date();
- }
- document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() + "; path=/";
- }
- function get_cookie(name) {
- var matches = document.cookie.match(new RegExp(
- "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
- ))
- return matches ? decodeURIComponent(matches[1]) : undefined
- }
- function set_lang(lang)
- {
- expires = new Date();
- expires.setTime(expires.getTime() + (1000 * 60 * 60 * 24));
- set_cookie('lang', lang, expires);
- window.location.reload();
- }
- function set_units()
- {
- var units = 'metric';
- if( document.getElementById("units_check").checked ) units = 'imperial';
- expires = new Date();
- expires.setTime(expires.getTime() + (1000 * 60 * 60 * 24));
- set_cookie('units', units, expires);
- window.location.reload();
- }
- </script>
- </head>
- <body>
- <div class="navbar navbar-fixed-top">
- <div class="navbar-inner">
- <div class="container">
- <a class="brand" href="/">Open Weather Map <span class="label label-warning">beta</span></a>
- <div class="nav-collapse">
- <ul class="nav">
- <li class="active"><a href="/Maps">Maps</a></li>
- <li class="active"><a href="/API">API</a></li>
- <li class="active"><a href="/price">Price</a></li>
- <li class="active"><a href="/login">Login / Register</a></li>
- </ul>
- </div>
- <!--
- <form action="/map" method="get" enctype="multipart/form-data" class="navbar-search pull-right">
- <img src="/images/flags/gb.png" alt="English" title="English" onclick="set_lang('en');" />
- <img src="/images/flags/ru.png" alt="Russian" title="Russian" onclick="set_lang('ru');" />
- </form>
- -->
- <div class="pull-right">
- <label class="toggle candy blue" style="width:100px" onclick="">
- <input id="units_check" type="checkbox" />
- <p onclick="set_units()">
- <span>  °C  </span>
- <span>  °F  </span>
- </p>
- <a class="slide-button" ></a>
- </label>
- </div>
- </div><!--/container -->
- <div id="stat" class="pull-right">
- </div>
- </div>
- </div>
- <div class="container">
- <div id="alert_body">
- </div>
- <script src="/js/highcharts/highcharts.js"></script>
- <script src="/js/highcharts/highcharts-more.js"></script>
- <script type="text/javascript" src="/js/suncalc-min.js"></script>
- <script src="http://openlayers.org/api/OpenLayers.js"></script>
- <script type="text/javascript">
- var time_zone = 1000 * (new Date().getTimezoneOffset())*(-60);
- var forecast = [{"dt":1398945600,"main":{"temp":3.7,"temp_min":3.7,"temp_max":3.75,"pressure":983.54,"sea_level":1022.23,"grnd_level":983.54,"humidity":98,"temp_kf":-0.05},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":6.91,"deg":334.502},"rain":{"3h":0.25},"sys":{"pod":"d"},"dt_txt":"2014-05-01 12:00:00"},{"dt":1398956400,"main":{"temp":4.51,"temp_min":4.51,"temp_max":4.55,"pressure":984.73,"sea_level":1023.06,"grnd_level":984.73,"humidity":100,"temp_kf":-0.05},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":7.16,"deg":333.505},"rain":{"3h":0.5},"sys":{"pod":"d"},"dt_txt":"2014-05-01 15:00:00"},{"dt":1398967200,"main":{"temp":6,"temp_min":6,"temp_max":6.05,"pressure":985.26,"sea_level":1023.32,"grnd_level":985.26,"humidity":99,"temp_kf":-0.04},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":88},"wind":{"speed":7.08,"deg":330},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-01 18:00:00"},{"dt":1398978000,"main":{"temp":8.37,"temp_min":8.37,"temp_max":8.41,"pressure":985.15,"sea_level":1023,"grnd_level":985.15,"humidity":92,"temp_kf":-0.04},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":80},"wind":{"speed":6.58,"deg":323.006},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-01 21:00:00"},{"dt":1398988800,"main":{"temp":8.94,"temp_min":8.94,"temp_max":8.97,"pressure":985.37,"sea_level":1023.26,"grnd_level":985.37,"humidity":85,"temp_kf":-0.04},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":88},"wind":{"speed":5.67,"deg":323.002},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-02 00:00:00"},{"dt":1398999600,"main":{"temp":7.27,"temp_min":7.27,"temp_max":7.31,"pressure":986.11,"sea_level":1024.32,"grnd_level":986.11,"humidity":83,"temp_kf":-0.04},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":80},"wind":{"speed":4.32,"deg":314.501},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-02 03:00:00"},{"dt":1399010400,"main":{"temp":6.24,"temp_min":6.24,"temp_max":6.28,"pressure":985.7,"sea_level":1024.16,"grnd_level":985.7,"humidity":84,"temp_kf":-0.03},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":76},"wind":{"speed":3.86,"deg":292.5},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-02 06:00:00"},{"dt":1399021200,"main":{"temp":5.08,"temp_min":5.08,"temp_max":5.11,"pressure":984.87,"sea_level":1023.37,"grnd_level":984.87,"humidity":86,"temp_kf":-0.03},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":56},"wind":{"speed":4.08,"deg":284.004},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-02 09:00:00"},{"dt":1399032000,"main":{"temp":4.09,"temp_min":4.09,"temp_max":4.12,"pressure":983.87,"sea_level":1022.21,"grnd_level":983.87,"humidity":86,"temp_kf":-0.03},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":3.71,"deg":261.508},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-02 12:00:00"},{"dt":1399042800,"main":{"temp":8.98,"temp_min":8.98,"temp_max":9.01,"pressure":982.2,"sea_level":1020.11,"grnd_level":982.2,"humidity":95,"temp_kf":-0.03},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":92},"wind":{"speed":3.81,"deg":244.503},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-02 15:00:00"},{"dt":1399053600,"main":{"temp":10.45,"temp_min":10.45,"temp_max":10.47,"pressure":980.48,"sea_level":1017.94,"grnd_level":980.48,"humidity":93,"temp_kf":-0.02},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":68},"wind":{"speed":3.21,"deg":194.002},"rain":{"3h":0.5},"sys":{"pod":"d"},"dt_txt":"2014-05-02 18:00:00"},{"dt":1399064400,"main":{"temp":12.73,"temp_min":12.73,"temp_max":12.75,"pressure":978.56,"sea_level":1015.96,"grnd_level":978.56,"humidity":82,"temp_kf":-0.02},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":24},"wind":{"speed":5.42,"deg":252.502},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-02 21:00:00"},{"dt":1399075200,"main":{"temp":12.59,"temp_min":12.59,"temp_max":12.61,"pressure":978.81,"sea_level":1016.13,"grnd_level":978.81,"humidity":76,"temp_kf":-0.02},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":48},"wind":{"speed":6.76,"deg":303.502},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-03 00:00:00"},{"dt":1399086000,"main":{"temp":10.53,"temp_min":10.53,"temp_max":10.55,"pressure":980.37,"sea_level":1018.09,"grnd_level":980.37,"humidity":74,"temp_kf":-0.02},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"clouds":{"all":64},"wind":{"speed":6.62,"deg":301.501},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-03 03:00:00"},{"dt":1399096800,"main":{"temp":9.74,"temp_min":9.74,"temp_max":9.76,"pressure":981.83,"sea_level":1019.79,"grnd_level":981.83,"humidity":81,"temp_kf":-0.01},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":88},"wind":{"speed":6.56,"deg":326},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-03 06:00:00"},{"dt":1399107600,"main":{"temp":7.96,"temp_min":7.96,"temp_max":7.97,"pressure":982.61,"sea_level":1020.81,"grnd_level":982.61,"humidity":82,"temp_kf":-0.01},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":20},"wind":{"speed":4.76,"deg":321.502},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-03 09:00:00"},{"dt":1399118400,"main":{"temp":5.98,"temp_min":5.98,"temp_max":5.99,"pressure":983.15,"sea_level":1021.6,"grnd_level":983.15,"humidity":84,"temp_kf":-0.01},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":3.51,"deg":264.5},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-03 12:00:00"},{"dt":1399129200,"main":{"temp":9.34,"temp_min":9.34,"temp_max":9.35,"pressure":984.45,"sea_level":1022.36,"grnd_level":984.45,"humidity":87,"temp_kf":-0.01},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":44},"wind":{"speed":7.58,"deg":301.5},"rain":{"3h":0.5},"sys":{"pod":"d"},"dt_txt":"2014-05-03 15:00:00"},{"dt":1399140000,"main":{"temp":10.41,"temp_min":10.41,"temp_max":10.42,"pressure":985.65,"sea_level":1023.17,"grnd_level":985.65,"humidity":81,"temp_kf":0},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":24},"wind":{"speed":9.61,"deg":301.001},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-03 18:00:00"},{"dt":1399150800,"main":{"temp":10.91,"temp_min":10.91,"temp_max":10.91,"pressure":986.42,"sea_level":1023.78,"grnd_level":986.42,"humidity":73,"temp_kf":0},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":36},"wind":{"speed":9.61,"deg":308},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-03 21:00:00"},{"dt":1399161600,"main":{"temp":9.62,"temp_min":9.62,"temp_max":9.62,"pressure":988.04,"sea_level":1025.66,"grnd_level":988.04,"humidity":67},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":32},"wind":{"speed":7.71,"deg":314.501},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-04 00:00:00"},{"dt":1399172400,"main":{"temp":6.51,"temp_min":6.51,"temp_max":6.51,"pressure":990.4,"sea_level":1028.45,"grnd_level":990.4,"humidity":67},"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":4.68,"deg":313.002},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-04 03:00:00"},{"dt":1399183200,"main":{"temp":3.6,"temp_min":3.6,"temp_max":3.6,"pressure":991.22,"sea_level":1029.81,"grnd_level":991.22,"humidity":74},"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01n"}],"clouds":{"all":0},"wind":{"speed":2.51,"deg":305},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-04 06:00:00"},{"dt":1399194000,"main":{"temp":2.12,"temp_min":2.12,"temp_max":2.12,"pressure":990.94,"sea_level":1029.68,"grnd_level":990.94,"humidity":78},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":88},"wind":{"speed":1.31,"deg":348.5},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-04 09:00:00"},{"dt":1399204800,"main":{"temp":3.52,"temp_min":3.52,"temp_max":3.52,"pressure":992.66,"sea_level":1031.43,"grnd_level":992.66,"humidity":85},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":92},"wind":{"speed":0.98,"deg":65.0036},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-04 12:00:00"},{"dt":1399215600,"main":{"temp":5.04,"temp_min":5.04,"temp_max":5.04,"pressure":993.89,"sea_level":1032.19,"grnd_level":993.89,"humidity":100},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":92},"wind":{"speed":2.03,"deg":234.502},"rain":{"3h":1},"sys":{"pod":"d"},"dt_txt":"2014-05-04 15:00:00"},{"dt":1399226400,"main":{"temp":6.78,"temp_min":6.78,"temp_max":6.78,"pressure":993.72,"sea_level":1031.51,"grnd_level":993.72,"humidity":99},"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"clouds":{"all":88},"wind":{"speed":1.97,"deg":99.5016},"rain":{"3h":0.5},"sys":{"pod":"d"},"dt_txt":"2014-05-04 18:00:00"},{"dt":1399237200,"main":{"temp":8.35,"temp_min":8.35,"temp_max":8.35,"pressure":992.92,"sea_level":1030.63,"grnd_level":992.92,"humidity":91},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":88},"wind":{"speed":2.02,"deg":68.5002},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-04 21:00:00"},{"dt":1399248000,"main":{"temp":9.08,"temp_min":9.08,"temp_max":9.08,"pressure":992.54,"sea_level":1030.35,"grnd_level":992.54,"humidity":78},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":24},"wind":{"speed":2.01,"deg":87.5},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-05 00:00:00"},{"dt":1399258800,"main":{"temp":4.91,"temp_min":4.91,"temp_max":4.91,"pressure":993.26,"sea_level":1031.52,"grnd_level":993.26,"humidity":77},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":24},"wind":{"speed":1.76,"deg":101.002},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-05 03:00:00"},{"dt":1399269600,"main":{"temp":3.47,"temp_min":3.47,"temp_max":3.47,"pressure":992.66,"sea_level":1031.25,"grnd_level":992.66,"humidity":71},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":36},"wind":{"speed":2.42,"deg":71.0017},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-05 06:00:00"},{"dt":1399280400,"main":{"temp":3.39,"temp_min":3.39,"temp_max":3.39,"pressure":991.72,"sea_level":1030.62,"grnd_level":991.72,"humidity":75},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04n"}],"clouds":{"all":92},"wind":{"speed":3.62,"deg":74.5012},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-05 09:00:00"},{"dt":1399291200,"main":{"temp":4.02,"temp_min":4.02,"temp_max":4.02,"pressure":993.48,"sea_level":1032.05,"grnd_level":993.48,"humidity":85},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"04d"}],"clouds":{"all":92},"wind":{"speed":3.91,"deg":64.5015},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-05 12:00:00"},{"dt":1399302000,"main":{"temp":7.94,"temp_min":7.94,"temp_max":7.94,"pressure":993.4,"sea_level":1031.37,"grnd_level":993.4,"humidity":89},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":56},"wind":{"speed":5.51,"deg":104.001},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-05 15:00:00"},{"dt":1399312800,"main":{"temp":10.82,"temp_min":10.82,"temp_max":10.82,"pressure":993.25,"sea_level":1031.06,"grnd_level":993.25,"humidity":79},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":48},"wind":{"speed":5.67,"deg":110.501},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-05 18:00:00"},{"dt":1399323600,"main":{"temp":12.09,"temp_min":12.09,"temp_max":12.09,"pressure":992.2,"sea_level":1029.86,"grnd_level":992.2,"humidity":76},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"clouds":{"all":64},"wind":{"speed":5.11,"deg":110.007},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-05 21:00:00"},{"dt":1399334400,"main":{"temp":11.32,"temp_min":11.32,"temp_max":11.32,"pressure":991.94,"sea_level":1029.57,"grnd_level":991.94,"humidity":71},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":44},"wind":{"speed":4.57,"deg":106.501},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-06 00:00:00"},{"dt":1399345200,"main":{"temp":7.74,"temp_min":7.74,"temp_max":7.74,"pressure":992.69,"sea_level":1030.89,"grnd_level":992.69,"humidity":68},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":48},"wind":{"speed":4.41,"deg":108.001},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-06 03:00:00"},{"dt":1399356000,"main":{"temp":6.08,"temp_min":6.08,"temp_max":6.08,"pressure":992.52,"sea_level":1030.92,"grnd_level":992.52,"humidity":67},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":32},"wind":{"speed":4.31,"deg":118.001},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-06 06:00:00"},{"dt":1399366800,"main":{"temp":4.81,"temp_min":4.81,"temp_max":4.81,"pressure":991.4,"sea_level":1029.97,"grnd_level":991.4,"humidity":72},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"clouds":{"all":20},"wind":{"speed":4.37,"deg":122.502},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-06 09:00:00"},{"dt":1399377600,"main":{"temp":4.2,"temp_min":4.2,"temp_max":4.2,"pressure":991.38,"sea_level":1029.96,"grnd_level":991.38,"humidity":75},"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"}],"clouds":{"all":0},"wind":{"speed":4.71,"deg":107.505},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-06 12:00:00"},{"dt":1399388400,"main":{"temp":8.8,"temp_min":8.8,"temp_max":8.8,"pressure":991.06,"sea_level":1029.08,"grnd_level":991.06,"humidity":75},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03d"}],"clouds":{"all":44},"wind":{"speed":6.33,"deg":107.005},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-06 15:00:00"},{"dt":1399399200,"main":{"temp":13.28,"temp_min":13.28,"temp_max":13.28,"pressure":990.14,"sea_level":1027.55,"grnd_level":990.14,"humidity":76},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":12},"wind":{"speed":7.06,"deg":111.502},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-06 18:00:00"},{"dt":1399410000,"main":{"temp":16.44,"temp_min":16.44,"temp_max":16.44,"pressure":987.59,"sea_level":1024.83,"grnd_level":987.59,"humidity":71},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02d"}],"clouds":{"all":12},"wind":{"speed":8.07,"deg":114.002},"rain":{"3h":0},"sys":{"pod":"d"},"dt_txt":"2014-05-06 21:00:00"},{"dt":1399420800,"main":{"temp":16.04,"temp_min":16.04,"temp_max":16.04,"pressure":986.46,"sea_level":1023.68,"grnd_level":986.46,"humidity":66},"weather":[{"id":802,"main":"Clouds","description":"scattered clouds","icon":"03n"}],"clouds":{"all":36},"wind":{"speed":7.96,"deg":122.5},"rain":{"3h":0},"sys":{"pod":"n"},"dt_txt":"2014-05-07 00:00:00"}];
- var daily = [{"dt":1398967200,"temp":{"day":6.01,"min":3.56,"max":9.35,"night":6.4,"eve":9.24,"morn":3.56},"pressure":988.26,"humidity":98,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"speed":6.03,"deg":333,"clouds":92,"rain":1.25,"wind_text":"Moderate breeze"},{"dt":1399053600,"temp":{"day":8.05,"min":4.55,"max":11.49,"night":7.05,"eve":11.49,"morn":4.55},"pressure":984.86,"humidity":100,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"speed":3.16,"deg":244,"clouds":92,"rain":3,"wind_text":"Light breeze"},{"dt":1399140000,"temp":{"day":9.86,"min":3.9,"max":10.53,"night":3.9,"eve":9.72,"morn":4.58},"pressure":987.92,"humidity":80,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"speed":8.86,"deg":297,"clouds":32,"rain":0.5,"wind_text":"Fresh Breeze"},{"dt":1399226400,"temp":{"day":8.53,"min":2.32,"max":10.1,"night":2.32,"eve":9.98,"morn":2.32},"pressure":997.53,"humidity":74,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"speed":1.92,"deg":5,"clouds":80,"wind_text":"Light breeze"},{"dt":1399312800,"temp":{"day":10.52,"min":3.67,"max":12.04,"night":4.63,"eve":11.37,"morn":3.67},"pressure":998.36,"humidity":70,"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04d"}],"speed":4.07,"deg":134,"clouds":68,"wind_text":"Gentle Breeze"},{"dt":1399399200,"temp":{"day":11.08,"min":-0.53,"max":11.48,"night":2.97,"eve":11.48,"morn":-0.53},"pressure":995.43,"humidity":0,"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"}],"speed":2.57,"deg":39,"clouds":0,"wind_text":"Light breeze"},{"dt":1399485600,"temp":{"day":13.9,"min":1.12,"max":14.39,"night":5.34,"eve":14.39,"morn":1.12},"pressure":999.09,"humidity":0,"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"}],"speed":2.13,"deg":330,"clouds":3,"wind_text":"Light breeze"},{"dt":1399572000,"temp":{"day":16.3,"min":3.55,"max":16.33,"night":11.09,"eve":16.33,"morn":3.55},"pressure":1003.25,"humidity":0,"weather":[{"id":800,"main":"Clear","description":"sky is clear","icon":"01d"}],"speed":7.08,"deg":142,"clouds":4,"wind_text":"Moderate breeze"},{"dt":1399658400,"temp":{"day":16.35,"min":8.88,"max":17.03,"night":16.84,"eve":17.03,"morn":8.88},"pressure":998.13,"humidity":0,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"speed":11.23,"deg":128,"clouds":7,"rain":0.31,"wind_text":"Strong breeze"},{"dt":1399744800,"temp":{"day":24.33,"min":18.2,"max":24.33,"night":18.62,"eve":23.74,"morn":18.2},"pressure":989.72,"humidity":0,"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"speed":8.04,"deg":170,"clouds":2,"rain":3.83,"wind_text":"Fresh Breeze"},{"dt":1399831200,"temp":{"day":22.31,"min":13.67,"max":22.31,"night":13.67,"eve":21.66,"morn":16.34},"pressure":987.42,"humidity":0,"weather":[{"id":500,"main":"Rain","description":"light rain","icon":"10d"}],"speed":4.92,"deg":256,"clouds":0,"rain":0.63,"wind_text":"Gentle Breeze"},{"dt":1399917600,"temp":{"day":21.85,"min":12.87,"max":23.99,"night":21.03,"eve":23.99,"morn":12.87},"pressure":991.8,"humidity":0,"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"speed":3.34,"deg":133,"clouds":79,"rain":11.14,"wind_text":""},{"dt":1400004000,"temp":{"day":25.51,"min":18.94,"max":25.54,"night":18.94,"eve":25.54,"morn":19.46},"pressure":984.33,"humidity":0,"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"speed":6.22,"deg":187,"clouds":6,"rain":4.18,"wind_text":"Moderate breeze"},{"dt":1400090400,"temp":{"day":23.79,"min":16.71,"max":23.79,"night":16.71,"eve":21.01,"morn":17.61},"pressure":981.29,"humidity":0,"weather":[{"id":502,"main":"Rain","description":"heavy intensity rain","icon":"10d"}],"speed":2.67,"deg":49,"clouds":3,"rain":14.56,"wind_text":"Light breeze"},{"dt":1400176800,"temp":{"day":17.07,"min":15.42,"max":17.07,"night":16.33,"eve":16.33,"morn":15.42},"pressure":987.46,"humidity":0,"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"speed":10.64,"deg":11,"clouds":64,"rain":3.34,"wind_text":"Fresh Breeze"}];
- jQuery(document).ready(function() {
- var dt = new Date(1398952065 * 1000);
- var hr =dt.getHours();
- if(hr < 10) hr = '0'+hr;
- var mn =dt.getMinutes();
- if(mn < 10) mn = '0'+mn;
- var mon =dt.getMonth()+1;
- if(mon < 10) mon = '0'+mon;
- var day =dt.getDate();
- if(day < 10) day = '0'+day;
- var year =dt.getFullYear();
- $("#date_m").html('get at ' + year+'.'+mon+'.'+day+' '+hr+':'+mn);
- var times = SunCalc.getTimes(new Date(), 44.94, -93.09);
- $("#sunrise").html(times.sunrise.getHours() + ':' + times.sunrise.getMinutes());
- $("#sunset").html(times.sunset.getHours() + ':' + times.sunset.getMinutes());
- showDailyListVertical();
- showDailyChart();
- showForecastSmall();
- showHourlyForecastChart();
- showForcastHourlyListLong();
- var t=document.location.href.split('#');
- if(t[1]) $("#"+t[1]+'_a').click();
- // Tab dispacher
- $('a[data-toggle="tab"]').on('shown', function (e) {
- if($(this).attr('href') == "#forecast") {
- }
- if($(this).attr('href') == "#forecast-chart") {
- showForcastChartVal('temp');
- }
- if($(this).attr('href') == "#map") {
- // ShowMap();
- }
- })
- var map = new OpenLayers.Map("map_canvas",
- {
- units: 'm',
- projection: new OpenLayers.Projection("EPSG:900913"),
- displayProjection: new OpenLayers.Projection("EPSG:4326")
- }
- );
- var mapnik = new OpenLayers.Layer.OSM();
- var precipitation = new OpenLayers.Layer.XYZ(
- "precipitation",
- "http://${s}.tile.openweathermap.org/map/precipitation/${z}/${x}/${y}.png",
- {
- numZoomLevels: 19,
- isBaseLayer: false,
- opacity: 0.7,
- sphericalMercator: true
- }
- );
- var PRMSL_MSL_CONTOUR = new OpenLayers.Layer.XYZ(
- "pressure",
- "http://${s}.tile.openweathermap.org/map/pressure_cntr/${z}/${x}/${y}.png",
- {
- numZoomLevels: 19,
- isBaseLayer: false,
- opacity: 0.4,
- sphericalMercator: true
- }
- );
- var centre = new OpenLayers.LonLat( -93.09, 44.94).transform(
- new OpenLayers.Projection("EPSG:4326"),
- new OpenLayers.Projection("EPSG:900913"));
- map.addLayers([mapnik, precipitation, PRMSL_MSL_CONTOUR]);
- map.setCenter( centre, 4);
- var ls = new OpenLayers.Control.LayerSwitcher({'ascending':false});
- map.addControl(ls);
- });
- // **************************** forecast *******************************
- // HTML Lists
- var month = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Avg", "Sen", "Oct", "Nov", "Dec"];
- function showDailyListVertical()
- {
- var html = ''
- for(var i = 0; i < daily.length-1; i ++){
- var dt = new Date(daily[i].dt * 1000 + time_zone);
- var day =dt.getDate() +' '+ month[dt.getMonth()];
- var temp = Math.round(10*(daily[i].temp.day))/10 ;
- var eve = Math.round(10*(daily[i].temp.eve))/10 ;
- var morn = Math.round(10*(daily[i].temp.morn))/10 ;
- var night = Math.round(10*(daily[i].temp.night))/10 ;
- var icon = daily[i].weather[0].icon;
- var text = daily[i].weather[0].description;
- html += '<tr><td>' + day + ' <img src="/img/w/'+icon+'.png" ></td><td>';
- if(temp>0) html += '<span class="badge badge-warning">';
- else html += '<span class="badge badge-info">';
- html += temp +'°C </span> <span class="badge badge">' + night +
- '°C </span>   <i>' +text+'</i> <p> '+daily[i].wind_text+ ' <br>overcast clouds: '+daily[i].clouds + '%, ' +
- daily[i].pressure+' hpa</p></td></tr>';
- }
- html='<table class="table">'+html+'</table>';
- $("#daily_list").html(html);
- }
- function showDailyChart()
- {
- var time = new Array();
- var tmp = new Array();
- var tmpr = new Array();
- var rain = new Array();
- var snow = new Array();
- //var prcp = new Array();
- //var wind = new Array();
- for(var i = 0; i < daily.length-1; i ++){
- tmp.push( Math.round(10*(daily[i].temp.day))/10 );
- var dt = new Date( daily[i].dt * 1000 + time_zone);
- time.push( dt );
- var tmpi = Math.round(10*(daily[i].temp.min))/10 ;
- var tmpa = Math.round(10*(daily[i].temp.max))/10 ;
- tmpr.push( [tmpi, tmpa ] );
- if(daily[i]['rain']) {
- rain.push( Math.round(daily[i]['rain']*100) / 100 );
- }else{
- rain.push( 0 );
- }
- if(daily[i]['snow']) {
- snow.push( Math.round(daily[i]['snow']*100) / 100 );
- }else{
- snow.push( 0 );
- }
- }
- $('#chart').highcharts({
- chart: {
- // zoomType: 'xy'
- type: 'column'
- },
- title: NaN,
- xAxis: {
- categories: time,
- labels: {
- formatter: function() {
- return Highcharts.dateFormat('%d %b', this.value);
- }
- }
- },
- yAxis: [
- {
- labels: {
- format: '{value}°C',
- style: {
- color: 'blue'
- }
- },
- title: {
- text: 'Temperature',
- style: {
- color: 'blue'
- }
- }
- },{
- labels: {
- format: '{value} mm',
- style: {
- color: '#909090'
- }
- },
- opposite: true,
- title: {
- text: 'Precipitation',
- style: {
- color: '#4572A7'
- }
- }
- }],
- tooltip: {
- useHTML: true,
- shared: true,
- formatter: function() {
- var s = '<small>'+ Highcharts.dateFormat('%d %b', this.x) +'</small><table>';
- $.each(this.points, function(i, point) {
- //console.log(point);
- if(point.y != 0)
- s += '<tr><td style="color:'+point.series.color+'">'+ point.series.name +': </td>'+
- '<td style="text-align: right"><b>'+point.y +'</b></td></tr>';
- }
- );
- return s+'</table>';
- }
- },
- plotOptions: {
- column: {
- stacking: 'normal'
- }
- },
- legend: NaN,
- series: [
- {
- name: 'Snow',
- type: 'column',
- color: '#909090',
- yAxis: 1,
- data: snow,
- stack: 'precipitation'
- },
- {
- name: 'Rain',
- type: 'column',
- color: '#B0B0B0',
- yAxis: 1,
- data: rain,
- stack: 'precipitation'
- },
- {
- name: 'Temperature',
- type: 'spline',
- color: 'blue',
- data: tmp
- },
- {
- name: 'Temperature min',
- data: tmpr,
- type: 'arearange',
- lineWidth: 0,
- linkedTo: ':previous',
- color: Highcharts.getOptions().colors[0],
- fillOpacity: 0.3,
- zIndex: 0
- }
- ]
- });
- }
- function showHourlyForecastChart()
- {
- var curdate = new Date( (new Date()).getTime()- 180 * 60 * 1000 );
- var cnt=0;
- var time = new Array();
- var tmp = new Array();
- var wind = new Array();
- var prcp = new Array();
- for(var i = 0; i < forecast.length; i ++){
- var dt = new Date(forecast[i].dt * 1000);
- if( curdate > dt ) continue;
- if(cnt > 10) break;
- cnt++;
- tmp.push( Math.round(10*(forecast[i].main.temp))/10 );
- time.push( new Date( forecast[i].dt * 1000 + time_zone) );
- wind.push(forecast[i].speed);
- var p=0;
- if(forecast[i]['rain'] && forecast[i]['rain']['3h']) p += forecast[i]['rain']['3h'];
- if(forecast[i]['snow'] && forecast[i]['snow']['3h']) p += forecast[i]['snow']['3h'];
- prcp.push( Math.round( p * 10 ) / 10 );
- }
- $('#chart_small').highcharts({
- chart: {
- zoomType: 'xy'
- },
- title: NaN,
- xAxis: {
- categories: time,
- type: 'datetime',
- labels: {
- formatter: function() {
- return Highcharts.dateFormat('%H:%M', this.value);
- }
- }
- },
- yAxis: [
- {
- labels: {
- format: '{value}°C',
- style: {
- color: 'blue'
- }
- },
- opposite: true,
- title:NaN
- },{
- labels: {
- format: '{value}mm',
- style: {
- color: '#4572A7'
- }
- },
- opposite: true,
- title: NaN
- }],
- tooltip: {
- useHTML: true,
- shared: true,
- formatter: function() {
- var s = '<small>'+ Highcharts.dateFormat('%d %b. %H:%M', this.x) +'</small><table>';
- $.each(this.points, function(i, point) {
- s += '<tr><td style="color:'+point.series.color+'">'+ point.series.name +': </td>'+
- '<td style="text-align: right"><b>'+point.y +'</b></td></tr>';
- });
- return s+'</table>';
- }
- },
- legend: {
- layout: 'vertical',
- align: 'left',
- x: 410,
- verticalAlign: 'top',
- y: 0,
- floating: true,
- backgroundColor: '#FFFFFF'
- },
- series: [
- {
- name: 'Precipitation',
- type: 'column',
- color: '#A0A0A0',
- yAxis: 1,
- data: prcp
- },{
- name: 'Temperature',
- type: 'spline',
- color: 'blue',
- data: tmp
- }]
- });
- };
- function showForecastSmall()
- {
- var curdate = new Date( (new Date()).getTime()- 180 * 60 * 1000 );
- var html = ''
- var cnt=0;
- for(var i = 0; i < forecast.length ; i ++){
- var dt = new Date(forecast[i].dt * 1000);
- if( curdate > dt ) continue;
- if(cnt > 10) break;
- cnt++;
- var temp = Math.round(10*(forecast[i].main.temp))/10 ;
- var tmin = Math.round(10*(forecast[i].main.temp_min)) / 10;
- var tmax = Math.round(10*(forecast[i].main.temp_max)) / 10 ;
- var text = forecast[i].weather[0].description;
- var gust = forecast[i].wind.speed;
- var pressure = forecast[i].main.pressure ;
- var cloud=forecast[i].clouds.all ;
- var icon = forecast[i].weather[0].icon;
- if( forecast[i].sys.pod == 'd' )
- html=html+ '<div style="float: left; text-align: center;" >';
- else
- html=html+ '<div style="float: left; text-align: center; background-color:#eeeeee" >';
- html=html+ '<img alt="'+text+'" src="/img/w/'+icon+'.png"/>\
- <div class="small_val" title="Wind">'+forecast[i].wind.speed+'m/s</div>\
- <div class="small_val_grey" title="Pressure">'+forecast[i].main.pressure+'</div>\
- </div>';
- }
- $("#forecast_small").html(html);
- };
- function showForcastHourlyListLong()
- {
- var curdate = new Date( (new Date()).getTime()- 180 * 60 * 1000 );
- var html = ''
- var lastday=0;
- var ar_tmin = new Array();
- var ar_tmax = new Array();
- min_cur = 500;
- max_cur = 0;
- lastday=0;
- for(var i = 0; i < forecast.length-2; i ++){
- if(! forecast[i].main) continue;
- var dt = new Date(forecast[i].dt * 1000);
- if( curdate > dt ) continue;
- var day =dt.getDate();
- var hr =dt.getHours();
- if(hr < 10) hr = '0'+hr;
- if(day!=lastday){
- html=html+"<tr class='well'><td colspan='2'><b>"+dt.toDateString()+"</b> </td></tr>" ;
- lastday = day;
- }
- //console.log(forecast[i].main);
- var temp = Math.round(10*(forecast[i].main.temp))/10 ;
- var tmin = Math.round(10*(forecast[i].main.temp_min)) / 10;
- var tmax = Math.round(10*(forecast[i].main.temp_max)) / 10 ;
- var text = forecast[i].weather[0].description;
- var img = forecast[i].weather[0].icon;
- var gust = forecast[i].wind.speed;
- var pressure = forecast[i].main.pressure ;
- var cloud=forecast[i].clouds.all ;
- html=html+'<tr><td>' + hr + ':00 <img src="http://openweathermap.org/img/w/'+img+'.png" > </td><td><span class="badge badge-info">'+temp +'°C </span> <i>' +text+'</i> ' +
- '<p>Temp. from '+tmin+' to '+tmax+'°C, Wind '+gust+ 'm/s. Clouds '+cloud+'%, ' +pressure+' hpa</p></td></tr>';
- }
- html='<table class="table">'+html+'</table>';
- $("#hourly_long_list").html(html);
- };
- //**************************** Chart *************************
- var chart;
- function showForcastChartVal(val)
- {
- var tmp = new Array();
- var tlbl = new Array();
- for(var i = 0; i < forecast.length; i ++){
- if(val == 'temp')
- tmp.push( Math.round( (forecast[i]['main']['temp']) * 100) / 100 );
- if(val == 'wind_ms')
- tmp.push( Math.round( forecast[i]['wind']['speed'] ) );
- if(val == 'pressure')
- tmp.push( Math.round( forecast[i]['main']['pressure'] ) );
- if(val == 'humidity')
- tmp.push( Math.round( forecast[i]['main']['humidity'] ) );
- if(val == 'precipitation') {
- if(forecast[i]['rain'] && forecast[i]['rain']['3h'])
- tmp.push( Math.round( forecast[i]['rain']['3h'] ) );
- if(forecast[i]['snow'] && forecast[i]['snow']['3h'])
- tmp.push( Math.round( forecast[i]['snow']['3h'] ) );
- else
- tmp.push( 0 );
- }
- tlbl.push( new Date(forecast[i]['dt'] * 1000 + time_zone) );
- }
- if(val == 'temp')
- label = 'Temperature';
- if(val == 'wind_ms')
- label = 'Wind';
- if(val == 'pressure')
- label = 'Pressure';
- if(val == 'humidity')
- label = 'Humidity';
- if(val == 'precipitation')
- label = 'Precipitation';
- chart = new Highcharts.Chart({
- chart: {
- renderTo: 'chart-forecast',
- type: 'spline'
- },
- title: {
- text: NaN,
- },
- tooltip: {
- formatter: function() {
- return '<b>'+ this.series.name +" </b><p>"+ Highcharts.dateFormat('%Y-%m-%d %H:%M', this.x)+' '+this.y +'°C </p>';
- }
- },
- xAxis: {
- type: 'datetime',
- categories: tlbl,
- tickInterval: 7,
- labels: {
- formatter: function() {
- return Highcharts.dateFormat('%d', this.value);
- },
- align: 'right',
- style: {
- font: 'normal 13px Verdana, sans-serif'
- }
- }
- },
- yAxis: {
- title: {
- text: NaN
- },
- plotLines: [{
- value: 0,
- width: 1,
- color: '#808080'
- }]
- },
- series: [{
- name: label,
- type: 'spline',
- data: tmp
- }
- ]
- });
- }
- function vote(v)
- {
- var jsonurl = "/vote?v="+v+"&id=5045360&t=city";
- $.get(jsonurl, voteOK).error(errorHandler);
- }
- function voteOK(v)
- {
- r=ParseJson(v);
- ShowInfoMess(r.message);
- }
- </script>
- <ul class="breadcrumb">
- <li>Do you have the same weather conditions now as we have forecasted? Click:</li>
- <li> <a class="vote-plus" href="javascript:vote(1);"></a><a href="javascript:vote(1);">yes</a> </li>
- <li><a class="vote-minus" href="javascript:vote(0);"></a><a href="javascript:vote(0);">no</a></li>
- <li>
- </li>
- </ul>
- <div class="row">
- <!-- left column -->
- <div class="span4">
- <h3>Saint Paul, US</h3>
- <h2> <img src="/img/w/10d.png"> 3.7°C</h2>
- light rain
- <p><div id="date_m"></div></p>
- <table class="table table-striped table-bordered table-condensed">
- <tbody>
- <tr><td>Wind</td><td>Moderate breeze 7.16 m/s <br>North-northwest (333.505°)</td></tr>
- <tr><td>Cloudiness</td><td>overcast clouds</td></tr>
- <tr><td>Pressure<br> (sea level)</td><td>1004.8 hpa</td></tr>
- <tr><td>Humidity</td><td>96 %</td></tr>
- <tr><td>Rain</td><td>0.5 mm/3 hour</td></tr>
- <tr><td>sunrise</td><td id="sunrise">1398942031</td></tr>
- <tr><td>sunset</td><td id="sunset">1398993495</td></tr>
- </tbody>
- </table>
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- OWM Station -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:300px;height:250px"
- data-ad-client="ca-pub-9649553505534207"
- data-ad-slot="4023774774"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- <!--
- <br>
- <object type="application/x-shockwave-flash" id="hpPal" name="hpPal" data="/img/yow/yowidget.swf" width="100%" height="200" style="visibility: visible;">
- <param name="quality" value="high">
- <param name="bgcolor" value="#FFFFFF">
- <param name="flashvars" value="fp_day_count=2&location_name=&forecast_provider=owm&lat=44.944408&lon=-93.093269&background=#FFFFFF&lang=en&unit_system=metric&time_format=24&copyright_bar=false">
- </object>
- <div style="height: 15px; font-size: 12px; font-family: Arial,Helvetica,sans-serif;">
- <span style="padding-left:2px; float:left; color:#888888;">
- <a href="http://yowindow.com">yowindow.com</a></span>
- <span style="padding-right:2px; float:right; color:#888888;">Forecast by
- <a href="http://openweathermap.org/" class="copyright">OWM</a></span>
- </div>
- -->
- <br>
- <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- Wide Skyscraper -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:300px;height:600px"
- data-ad-client="ca-pub-9649553505534207"
- data-ad-slot="9791106779"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- <!-- right body -->
- <div class="span8">
- <ul class="nav nav-tabs">
- <li class="active"><a href="#forecast-main" data-toggle="tab" id="forecast-main_a" >Main</a></li>
- <li><a href="#daily_chart" data-toggle="tab" id="daily_chart_a">Daily</a></li>
- <li><a href="#hourly_list" data-toggle="tab" id="hourly_list_a">Hourly</a></li>
- <li><a href="#forecast-chart" data-toggle="tab" id="forecast-chart_a">Chart</a></li>
- <li><a href="#map" data-toggle="tab" id="map_a">Map</a></li>
- <li><a href="#stations" data-toggle="tab" id="stations_a">Stations</a></li>
- </ul>
- <div class="tab-content">
- <!--Main-->
- <div class="tab-pane active" id="forecast-main">
- <h3>Next hours</h3>
- <div id="chart_small" style="width: 650px; height: 200px; " ></div>
- <div id="forecast_small"></div>
- <div class="row">
- <div class="span8">
- <br/><br/>
- <h3>Next days</h3>
- <div id="daily_list"></div>
- </div>
- </div>
- </div>
- <!--Daily-->
- <div class="tab-pane" id="daily_chart">
- <div id="chart" style="width: 600px; height: 400px; margin: 0 auto" ></div>
- </div>
- <!--Hourly-->
- <div class="tab-pane" id="hourly_list">
- <div id="hourly_long_list"></div>
- </div>
- <!--Charts-->
- <div class="tab-pane" id="forecast-chart">
- <ul class="nav nav-pills">
- <li class=""><a href="javascript:showForcastChartVal('temp');" rel="tooltip" title="Temperature" >Temperature</a></li>
- <li class=""><a href="javascript:showForcastChartVal('wind_ms');" rel="tooltip" title="Wind" >Wind</a></li>
- <li class=""><a href="javascript:showForcastChartVal('pressure');" rel="tooltip" title="Pressure" >Pressure</a></li>
- <li class=""><a href="javascript:showForcastChartVal('precipitation');" rel="tooltip" title="Precipitation" >Precipitation</a></li>
- </ul>
- <div id="chart-forecast" style="width: 600px; height: 400px; margin: 0 auto" ></div>
- </div>
- <!--Map-->
- <div class="tab-pane" id="map">
- <h4>Precipitation</h4>
- <div id="map-container" >
- <div id="map_canvas" style="width: 610px; height: 400px;"></div>
- </div>
- </div>
- <!--Stations-->
- <div class="tab-pane" id="stations">
- <h4 id="stations_title">
- <a href="/Maps?zoom=10&lat=44.944408&lon=-93.093269&layers=B0TFFFFT">
- Stations. All = 7, Bad = 0.
- </a></h4>
- <table class="table">
- <thead><tr><th>R</th><th>Stations name</th><th>temp (°C)</th><th></th><th>dist (km)</th><th>time gap (hh:mm:ss)</th></tr></thead>
- <tr>
- <td>124</td>
- <td><a href ="/station/1573"> KSTP </a></dt>
- <td>4</td>
- <td> prs=1007 hmd=86 wnd=6.2(330)</td>
- <td>2.414</td>
- <td>01:21:28</td>
- </tr>
- <tr>
- <td>112</td>
- <td><a href ="/station/1536"> KMSP </a></dt>
- <td>3</td>
- <td> prs=1007 hmd=100 wnd=5.1(320)</td>
- <td>12.22</td>
- <td>01:21:28</td>
- </tr>
- <tr>
- <td>188</td>
- <td><a href ="/station/95417"> ardathksheyna </a></dt>
- <td>4</td>
- <td> prs=1004.8 hmd=96(90)</td>
- <td>14.848</td>
- <td>00:26:43</td>
- </tr>
- <tr>
- <td>91</td>
- <td><a href ="/station/1537"> KANE </a></dt>
- <td>4</td>
- <td> prs=1006 hmd=100 wnd=5.1(320)</td>
- <td>15.882</td>
- <td>01:29:28</td>
- </tr>
- <tr>
- <td>96</td>
- <td><a href ="/station/1541"> KMIC </a></dt>
- <td>3</td>
- <td> prs=1007 hmd=93 wnd=5.7(340)</td>
- <td>24.79</td>
- <td>01:21:28</td>
- </tr>
- <tr>
- <td>138</td>
- <td><a href ="/station/1540"> KFCM </a></dt>
- <td>4</td>
- <td> prs=1006 hmd=86 wnd=5.1(330)</td>
- <td>31.62</td>
- <td>00:56:28</td>
- </tr>
- <tr>
- <td>164</td>
- <td><a href ="/station/1492"> KCFE </a></dt>
- <td>4</td>
- <td> prs=1008 hmd=86 wnd=5.1(320)</td>
- <td>37.501</td>
- <td>00:39:28</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div> <!-- /container -->
- <br />
- <footer class="footer well">
- <div class="container">
- <div class="row">
- <div class="span4">
- <h4>How to connect weather station?</h4>
- <ul>
- <li><a href="/stations">How to connect my weather station?</a></li>
- <li><a href="/hugemaps">How to connect the data layer of current weather</a></li>
- <li><a href="/API">Getting Data from JSON</a></li>
- </ul>
- </div>
- <div class="span4">
- <h4>Information </h4>
- <ul>
- <li><a href="/about">About</a></li>
- <li><a href="/copyright">Copyright</a></li>
- <li><a href="/source">Data Sources</a></li>
- </ul>
- </div>
- <div class="span4">
- <!--
- <a href="javascript:void(0);" onclick="javascript:window.prompt ('To donate, please copy-paste my Bitcoin address to your Bitcoin software - I cannot do it automatically.\nTo copy it, right-click the selected text and select \'Copy\'.\nThen right-click the address field in your Bitcoin software and select \'Paste\'.', '1K8fwn7dd4ypymJQ49TMUHWX6UcVzgWHNA');">
- <img src="/images/btc-donate.png" alt="Donate Bitcoin to 1K8fwn7dd4ypymJQ49TMUHWX6UcVzgWHNA" /></a>
- <a href="https://twitter.com/OpenWeatherMap" class="twitter-follow-button" data-show-count="true"
- data-size="large" data-show-screen-name="false">Follow @OpenWeatherMap</a>
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
- -->
- </div>
- </div><!-- /row -->
- </div>
- </footer>
- <script type="text/javascript">
- (function (d, w, c) {
- (w[c] = w[c] || []).push(function() {
- try {
- w.yaCounter23364583 = new Ya.Metrika({id:23364583,
- trackLinks:true});
- } catch(e) { }
- });
- var n = d.getElementsByTagName("script")[0],
- s = d.createElement("script"),
- f = function () { n.parentNode.insertBefore(s, n); };
- s.type = "text/javascript";
- s.async = true;
- s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
- if (w.opera == "[object Opera]") {
- d.addEventListener("DOMContentLoaded", f, false);
- } else { f(); }
- })(document, window, "yandex_metrika_callbacks");
- </script>
- <noscript><div><img src="//mc.yandex.ru/watch/23364583" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
- </body>
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-31601618-1']);
- _gaq.push(['_setDomainName', 'openweathermap.org']);
- _gaq.push(['_trackPageview']);
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
- <script type="text/javascript">
- jQuery(document).ready(function() {
- var units = 'metric';
- if( get_cookie('units') ) units = get_cookie('units');
- if( units == 'metric') {
- document.getElementById("units_check").checked = true;
- }else{
- document.getElementById("units_check").checked = false;
- }
- });
- </script>
- </html>
Add Comment
Please, Sign In to add comment