File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 94
94
</ div >
95
95
96
96
< div id ="map "> </ div >
97
+ < script src ="https://cdn.socket.io/socket.io-1.4.5.js "> </ script >
97
98
< script type ="text/javascript " src ="config/userdata.js "> </ script >
98
99
< script type ="text/javascript " src ="js/main.js "> </ script >
99
100
</ body >
Original file line number Diff line number Diff line change 2
2
3
3
$ ( document ) . ready ( function ( ) {
4
4
mapView . init ( ) ;
5
+ var socket = io . connect ( 'http://' + document . domain + ':' + location . port + '/event' ) ;
6
+ socket . on ( 'connect' , function ( ) {
7
+ console . log ( 'connected!' ) ;
8
+ } ) ;
9
+ socket . on ( 'logging' , function ( msg ) {
10
+ for ( var i = 0 ; i < msg . length ; i ++ ) {
11
+ mapView . log ( {
12
+ message : msg [ i ] . output ,
13
+ color : msg [ i ] . color + "-text"
14
+ } ) ;
15
+ }
16
+ } ) ;
5
17
} ) ;
6
18
7
19
var mapView = {
@@ -819,4 +831,4 @@ if (!String.prototype.format) {
819
831
return typeof args [ number ] != 'undefined' ? args [ number ] : match ;
820
832
} ) ;
821
833
} ;
822
- }
834
+ }
You can’t perform that action at this time.
0 commit comments