--- web/googlemap.cgi 2007/12/03 14:57:48 17 +++ web/googlemap.cgi 2007/12/03 15:06:33 18 @@ -74,20 +74,26 @@ } close($fh); - #$map->zoom(10); - #$map->v2_zoom(0); - $map->controls("large_map_control", "map_type_control"); - $map->map_type('hybrid'); + if ( $points > 0 ) { - my ( $map_div, $map_script ); - ( $head, $map_div, $map_script ) = $map->render; + #$map->zoom(10); + #$map->v2_zoom(0); + $map->controls("large_map_control", "map_type_control"); + $map->map_type('hybrid'); - $html .= join('', qq{ + my ( $map_div, $map_script ); + ( $head, $map_div, $map_script ) = $map->render; + + $html .= join('', qq{

Plotting $points points from }, $q->param('trace'), qq{

$map_div $map_script GPS - NMEA sentence information - }); + }); + + } else { + $html .= 'No points found for ' . $q->param('trace') . ''; + } }