File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ var startDate = new Date(Date.parse('2012-01-01T19:00:00Z'));
8
8
var frameRate = 0.5 ; // frames per second
9
9
var animationId = null ;
10
10
11
- var counter = 0 ;
12
-
13
11
var layers = [
14
12
new ol . layer . Tile ( {
15
13
source : new ol . source . MapQuest ( { layer : 'sat' } )
@@ -32,6 +30,11 @@ var map = new ol.Map({
32
30
} )
33
31
} ) ;
34
32
33
+ var updateInfo = function ( ) {
34
+ var el = document . getElementById ( 'info' ) ;
35
+ el . innerHTML = startDate . toISOString ( ) ;
36
+ } ;
37
+
35
38
var setTime = function ( ) {
36
39
startDate . setHours ( startDate . getHours ( ) + 1 ) ;
37
40
layers [ 1 ] . getSource ( ) . updateParams ( { 'TIME' : startDate . toISOString ( ) } ) ;
@@ -50,11 +53,6 @@ var play = function() {
50
53
animationId = window . setInterval ( setTime , 1000 / frameRate ) ;
51
54
} ;
52
55
53
- var updateInfo = function ( ) {
54
- var el = document . getElementById ( 'info' ) ;
55
- el . innerHTML = startDate . toISOString ( ) ;
56
- } ;
57
-
58
56
var startButton = document . getElementById ( 'play' ) ;
59
57
startButton . addEventListener ( 'click' , play , false ) ;
60
58
You can’t perform that action at this time.
0 commit comments