3 # Author. John D. Coryat 08/2007...
5 use CGI qw/:standard *table/ ;
8 my $zoom = param('Z') ; # Zoom
9 my $py = param('Y') ; # Y Tile Name
10 my $px = param('X') ; # X Tile Name
11 my $path = $ENV{'DOCUMENT_ROOT'} . "/ws-2010-08/tiles" ;
17 if ( !defined($zoom) or !$zoom ) # Has to be a zoom
24 $file = "$path/$zoom/v_$px" . "_$py" . ".png" ;
26 print STDERR "$file\n" ;
28 $size = ( -s $file ) ;
30 if ( !$size ) # not found
32 $file = $path . "/notiles.png" ;
33 $size = ( -s $file ) ;
36 if ( $size and open ( PNG, $file ) )
38 read ( PNG, $x, $size ) ;
40 print header(-type=> 'image/png', -expires=> '+1d', -Pragma=> 'no-cache') ;