Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 20: | Rivi 20: | ||
jQuery.getScript( "//www.jarviwiki.fi/citobsjs/jwapi.js", function() { | jQuery.getScript( "//www.jarviwiki.fi/citobsjs/jwapi.js", function() { | ||
jw = new jwApi(); | jw = new jwApi(); | ||
jw.loadObses( { 'obscode': 'temp||alg|| | jw.loadObses( { 'obscode': 'temp||alg||level', 'waterbody': page, 'startdate': aweekago.toISOString() }, function( o ) { | ||
jw.loadObses( { 'obscode': 'ice', 'waterbody': page, 'startdate': twoweeksago.toISOString() }, function( o ) { | jw.loadObses( { 'obscode': 'ice', 'waterbody': page, 'startdate': twoweeksago.toISOString() }, function( o ) { | ||
jw.loadObses( { 'obscode': 'secchi', 'waterbody': page, 'startdate': amonthago.toISOString() }, function( o ) { | jw.loadObses( { 'obscode': 'secchi', 'waterbody': page, 'startdate': amonthago.toISOString() }, function( o ) { | ||
obsesReady(); | jw.loadObses( { 'obscode': 'avglevelw', 'waterbody': page }, function( o ) { | ||
obsesReady(); | |||
}); | |||
}); | }); | ||
}); | }); | ||
| Rivi 34: | Rivi 36: | ||
jw.obstype = {}; | jw.obstype = {}; | ||
jw.obstypeorder = []; | jw.obstypeorder = []; | ||
console.log( jw ); | |||
for ( var oi in jw.obsList ) { | for ( var oi in jw.obsList ) { | ||
var o = jw.obsList[oi]; | var o = jw.obsList[oi]; | ||
| Rivi 205: | Rivi 207: | ||
out += '</div>'; | out += '</div>'; | ||
} else if ( ot == ' | } else if ( ot == 'level' ) { | ||
//console.log( jw. | |||
out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-direction: column; background-color: none;">'; | //out += '<div style="width: 84px; height: 84px; margin: auto; border-radius: 50%; display: flex; justify-content: center; align-items: center; flex-direction: column; background-color: none;">'; | ||
out += '<div style="font-size: 36px;">+19</div>'; | //out += '<div style="font-size: 36px;">+19</div>'; | ||
out += '<div style="font-size: 24px; margin-top: -20px;">cm</div>'; | //out += '<div style="font-size: 24px; margin-top: -20px;">cm</div>'; | ||
out += '</div>'; | //out += '</div>'; | ||
out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | //out += '<div style="height: 60px; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
out += '<span class="h6" style="margin: 0;">' + 'Vedenpinta korkea' + '</span>'; | //out += '<span class="h6" style="margin: 0;">' + 'Vedenpinta korkea' + '</span>'; | ||
out += '</div>'; | //out += '</div>'; | ||
} | } | ||


