Changeset 676
- Timestamp:
- Jan 18, 2009, 2:56:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/cgi/get-meta.fcgi
r635 r676 114 114 115 115 chomp $line; 116 my ($e,$n,$sheet,$year ) = split(/,/, $line);116 my ($e,$n,$sheet,$year,$legend) = split(/,/, $line); 117 117 118 118 # Do they want this one? … … 121 121 $m{sheet} = $sheet; 122 122 $m{year} = $year; 123 $m{legend} = $legend; 123 124 $tiles{$e}->{$n} = \%m; 124 125 } … … 156 157 print " <year>$m{year}</year>\n"; 157 158 } 159 if($m{legend}) { 160 print " <legend>$m{legend}</legend>\n"; 161 } 158 162 print " </result>\n"; 159 163 } else { … … 179 183 print " \"${easting}x${northing}\":{ "; 180 184 if(keys %m) { 181 print "easting:$easting, northing:$northing, sheet:\"$m{sheet}\", year:\"$m{year}\" ";185 print "easting:$easting, northing:$northing, sheet:\"$m{sheet}\", year:\"$m{year}\", legend:\"$m{legend}\""; 182 186 } 183 187 $count++; … … 193 197 } else { 194 198 print header("text/plain"); 195 print "# Easting,Northing,Sheet,Year \n";199 print "# Easting,Northing,Sheet,Year,Legend\n"; 196 200 197 201 foreach my $easting (sort keys %tiles) { … … 200 204 if(keys %{$tiles{$easting}->{$northing}}) { 201 205 print $tiles{$easting}->{$northing}->{sheet}.","; 202 print $tiles{$easting}->{$northing}->{year}."\n"; 206 print $tiles{$easting}->{$northing}->{year}.","; 207 print $tiles{$easting}->{$northing}->{legend}."\n"; 203 208 } else { 204 209 print ",\n";
Note: See TracChangeset
for help on using the changeset viewer.