Changeset 677 for trunk


Ignore:
Timestamp:
Jan 18, 2009, 5:58:06 PM (11 years ago)
Author:
Nick Burch
Message:

Show legends if possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r654 r677  
    580580                tds[count] = "<td>" + meta[pos]['sheet'];
    581581                if( meta[pos]['year'] ) {
    582                         tds[count] += " (" + meta[pos]['year'] + ")";
     582                        var startLink = "";
     583                        var endLink = "";
     584                        if( meta[pos]['legend'] ) {
     585                                startLink = "<a href=\"../legends/legend-" + meta[pos]['legend'] + ".jpg\" title=\"Legend for this map\">";
     586                                endLink = "</a>";
     587                        }
     588
     589                        tds[count] += " (" + startLink + meta[pos]['year'] + endLink + ")";
    583590                }
    584591                tds[count] += "</td>";
Note: See TracChangeset for help on using the changeset viewer.