*/\r
start: function (event, options) {\r
var that = this;\r
+ var sView;\r
\r
// ensure the map has been initialized in the setup function above\r
var isMapSetup = function () {\r
}\r
else{\r
\r
- for ( var i = 0; i < rM.length; i++ ) {\r
+ for ( var k = 0; k < rM.length; k++ ) {\r
\r
- if( that.media.currentTime >= (options.interval*( i+1 ) )/1000 &&\r
- ( that.media.currentTime <= (options.interval*( i+2 ) )/1000 ||\r
+ if( that.media.currentTime >= (options.interval*( k+1 ) )/1000 &&\r
+ ( that.media.currentTime <= (options.interval*( k+2 ) )/1000 ||\r
that.media.currentTime >= options.interval*( rM.length )/1000 ) ){\r
\r
- sView2.setPosition( checkpoints[i] );\r
+ sView2.setPosition( checkpoints[ k ] );\r
\r
sView2.setPov({\r
heading: options.heading || 0,\r
} \r
}, t );\r
\r
- }\r
+ };\r
\r
\r
// Determines if we should use hardcoded values ( using options.tween ),\r
\r
});\r
\r
- function showSteps( directionResult, that ) {\r
+ var showSteps = function ( directionResult, that ) {\r
\r
// Push new google map lat and lng values into an array from our list of lat and lng values\r
for ( var j = 0; j < directionResult.routes[ 0 ].overview_path.length; j++ ) {\r
options.interval = options.interval || 1000;\r
tween( checkpoints, 10);\r
\r
- }\r
+ };\r
}\r
else if( typeof options.tween === "object" ){\r
\r