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" ;
12 $path = '/srv/google-map-markers-with-tile-layer/tiles';
18 if ( !defined($zoom) or !$zoom ) # Has to be a zoom
25 $file = "$path/$zoom/v_$px" . "_$py" . ".png" ;
27 print STDERR "$file\n" ;
29 $size = ( -s $file ) ;
31 if ( !$size ) # not found
33 $file = $path . "/notiles.png" ;
34 $size = ( -s $file ) ;
37 if ( $size and open ( PNG, $file ) )
39 read ( PNG, $x, $size ) ;
41 print header(-type=> 'image/png', -expires=> '+1d', -Pragma=> 'no-cache') ;