File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -57,18 +57,14 @@ <h1 class="speed">
5757 /*Compass: https://thenounproject.com/search/?q=compass&i=592352*/
5858 </ style >
5959 < script >
60- const arrow = document . querySelector ( '.arrow' ) ;
61- const speed = document . querySelector ( '.speed-value' ) ;
62-
63- navigator . geolocation . watchPosition ( ( data ) => {
64- console . log ( data ) ;
65- speed . textContent = data . coords . speed ;
66- arrow . style . transform = `rotate(${ data . coords . heading } deg)` ;
67- } , ( err ) => {
68- console . err ( err ) ;
69- alert ( 'HEY! YOU GOTTA ALLOW THAT TO HAPPEN!!!' ) ;
70- } ) ;
60+ const arrow = document . querySelector ( '.arrow' )
61+ const speed = document . querySelector ( '.speed-value' )
7162
63+ navigator . geolocation . watchPosition ( function ( data ) {
64+ console . log ( data )
65+ speed . textContent = data . coords . speed || 0
66+ arrow . style . transform = `rotate(${ data . coords . heading } deg)`
67+ } )
7268 </ script >
7369</ body >
7470</ html >
You can’t perform that action at this time.
0 commit comments