/[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 30 by dpavlin, Fri Dec 7 15:53:41 2007 UTC revision 31 by dpavlin, Sat Dec 8 20:37:50 2007 UTC
# Line 47  my $html = join('', qq{ Line 47  my $html = join('', qq{
47                  -name => 'show',                  -name => 'show',
48                  -value => 'Show trace'                  -value => 'Show trace'
49          ),          ),
         ' Export to ',  
         $q->submit(  
                 -name => 'export',  
                 -value => 'KML'  
         ),  
50          $q->br,          $q->br,
51          'Draw ',          'Draw ',
52          $q->popup_menu(          $q->popup_menu(
# Line 76  my $html = join('', qq{ Line 71  my $html = join('', qq{
71                  -onChange => 'trace_frm.submit()',                  -onChange => 'trace_frm.submit()',
72          ),          ),
73          ' placemarks',          ' placemarks',
74          $q->end_form,          $q->br,
75  );  );
76    
77    
# Line 198  if ( my $trace = $q->param('trace') ) { Line 193  if ( my $trace = $q->param('trace') ) {
193                  );                  );
194    
195                  if ( my $export = $q->param('export') ) {                  if ( my $export = $q->param('export') ) {
196                          if ( $export eq 'KML' ) {                          if ( $export =~ m/KML/i ) {
197                                  print $q->header(                                  print $q->header(
198                                          -type => 'application/xhtml+xml',                                          -type => 'application/vnd.google-earth.kml+xml',
199                                  ),                                  ),
200                                  KML->output( placemarks => \@filtered_placemarks );                                  KML->output( placemarks => \@filtered_placemarks );
201                                  exit;                                  exit;
# Line 227  if ( my $trace = $q->param('trace') ) { Line 222  if ( my $trace = $q->param('trace') ) {
222  $#points + 1, ' points from <tt>', $q->param('trace'), '</tt> showing ',  $#points + 1, ' points from <tt>', $q->param('trace'), '</tt> showing ',
223          $points ? $points . ' points' . ( $placemarks ? ' and ' : '' ) : '',          $points ? $points . ' points' . ( $placemarks ? ' and ' : '' ) : '',
224          $placemarks ? $placemarks . ' placemarks' : '',          $placemarks ? $placemarks . ' placemarks' : '',
225            ' export to ',
226            $q->submit(
227                    -name => 'export',
228                    -value => 'KML'
229            ),
230          qq{          qq{
231  $map_div  $map_div
232  $map_script  $map_script
# Line 244  $map_script Line 244  $map_script
244                  $html .= '<em>No points found for ' . $q->param('trace') . '</em>';                  $html .= '<em>No points found for ' . $q->param('trace') . '</em>';
245          }          }
246    
247            $html .= $q->end_form;
248  }  }
249    
250  print $q->header;  print $q->header;

Legend:
Removed from v.30  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26