/[maps]/web/googlemap.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /web/googlemap.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by dpavlin, Fri Dec 7 02:38:47 2007 UTC revision 29 by dpavlin, Fri Dec 7 04:05:07 2007 UTC
# Line 9  use CGI::Carp qw/fatalsToBrowser/; Line 9  use CGI::Carp qw/fatalsToBrowser/;
9  use File::Find;  use File::Find;
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
11    
12  use lib '../';  use lib '../lib';
13    use blib;
14  use NMEA;  use NMEA;
15    
16  my $trace_path = '/home/dpavlin/x/openmoko/gps/';  my $trace_path = '../nmea/';
17    
18  # http://localhost/  # http://localhost/
19  my $map_key = 'ABQIAAAAVQ5szt9Jd8ws6vgfVQOEmhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQ1cKf0DwFJcwtpESJEI0hL8QgtYg';  my $map_key = 'ABQIAAAAVQ5szt9Jd8ws6vgfVQOEmhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQ1cKf0DwFJcwtpESJEI0hL8QgtYg';
# Line 38  my $html = join('', qq{ Line 39  my $html = join('', qq{
39                                  "$_ (" . (stat("$trace_path/$_"))[7] . " bytes)"                                  "$_ (" . (stat("$trace_path/$_"))[7] . " bytes)"
40                          }                          }
41                          sort {                          sort {
42                                  (stat("$trace_path/$a"))[10] <=> (stat("$trace_path/$b"))[10]                                  (stat("$trace_path/$a"))[9] <=> (stat("$trace_path/$b"))[9]
43                          } @traces                          } @traces
44                  ],                  ],
45                  -onChange => 'trace_frm.submit()',                  -onChange => 'trace_frm.submit()',
# Line 97  if ( my $trace = $q->param('trace') ) { Line 98  if ( my $trace = $q->param('trace') ) {
98                          html => join('<br/>',                          html => join('<br/>',
99                                  map {                                  map {
100                                          ucfirst($_) . ': ' . $hash->{$_}                                          ucfirst($_) . ': ' . $hash->{$_}
101                                  } ( qw/time lat lon speed course/ )                                  } ( qw/number time lat lon speed course/ )
102                          ),                          ),
103                  };                  };
104    
# Line 206  $map_div Line 207  $map_div
207  $map_script  $map_script
208  <a href="http://aprs.gids.nl/nmea/">GPS - NMEA sentence information</a>  <a href="http://aprs.gids.nl/nmea/">GPS - NMEA sentence information</a>
209                  });                  });
210    
211                    my $stats = NMEA->stats;
212                    $html .= '<table>';
213                    foreach my $n ( keys %$stats ) {
214                            $html .= "<tr><td>$n</td><td>" . $stats->{$n} . "</td></tr>";
215                    }
216                    $html .= '</table>';
217                    
218          } else {          } else {
219                  $html .= '<em>No points found for ' . $q->param('trace') . '</em>';                  $html .= '<em>No points found for ' . $q->param('trace') . '</em>';

Legend:
Removed from v.25  
changed lines
  Added in v.29

  ViewVC Help
Powered by ViewVC 1.1.26