/[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 14 by dpavlin, Mon Dec 3 14:25:40 2007 UTC revision 18 by dpavlin, Mon Dec 3 15:06:33 2007 UTC
# Line 26  my $q = CGI->new; Line 26  my $q = CGI->new;
26    
27  print $q->header;  print $q->header;
28    
29  print qq{  my $head = '';
30  <html>  my $html = join('', qq{
 <title>Read GPS - NMEA sentence and display it on GoogleMaps</title>  
 <body>  
31  <h1>Select GPS NMEA dump</h1>  <h1>Select GPS NMEA dump</h1>
32          },          },
33          $q->start_form,          $q->start_form,
# Line 45  print qq{ Line 43  print qq{
43                  ],                  ],
44          ),          ),
45          $q->submit( -value => 'Show trace' ),          $q->submit( -value => 'Show trace' ),
46          $q->end_form;          $q->end_form,
47    );
48    
49  if ( my $trace = $q->param('trace') ) {  if ( my $trace = $q->param('trace') ) {
50          $trace =~ s/\s.+$//;          $trace =~ s/\s.+$//;
# Line 75  if ( my $trace = $q->param('trace') ) { Line 74  if ( my $trace = $q->param('trace') ) {
74          }          }
75          close($fh);          close($fh);
76    
77          #$map->zoom(10);          if ( $points > 0 ) {
78          #$map->v2_zoom(0);  
79          $map->controls("large_map_control", "map_type_control");                  #$map->zoom(10);
80          $map->map_type('hybrid');                  #$map->v2_zoom(0);
81                    $map->controls("large_map_control", "map_type_control");
82                    $map->map_type('hybrid');
83    
84          my ($head, $map_div, $map_script) = $map->render;                  my ( $map_div, $map_script );
85                    ( $head, $map_div, $map_script ) = $map->render;
86    
87          print qq{                  $html .= join('', qq{
88  <h1>Plotting $points points from }, $q->param('trace'), qq{</h1>  <h1>Plotting $points points from }, $q->param('trace'), qq{</h1>
89  $map_div  $map_div
90  $map_script  $map_script
91  <a href="http://aprs.gids.nl/nmea/">GPS - NMEA sentence information</a>  <a href="http://aprs.gids.nl/nmea/">GPS - NMEA sentence information</a>
92          };                  });
93            
94            } else {
95                    $html .= '<em>No points found for ' . $q->param('trace') . '</em>';
96            }
97    
98  }  }
99    
100  print qq{  print qq{
101    <html>
102    <head>
103    <title>Read GPS - NMEA sentence and display it on GoogleMaps</title>
104    $head
105    </head>
106    <body>
107    $html
108  </body>  </body>
109  </html>  </html>
110  };  };

Legend:
Removed from v.14  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26