Changeset 664 for trunk


Ignore:
Timestamp:
Sep 16, 2008, 4:27:46 PM (11 years ago)
Author:
Nick Burch
Message:

Links to main site

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gpx.npemap.org.uk/favourite_postcode.xml

    r663 r664  
    3838  gadgets.util.registerOnLoadHandler(startApp);
    3939  var geocoder = "http://www.npemap.org.uk/cgi/geocoder.fcgi?format=js&postcode=";
     40  var mainSite = "http://www.npemap.org.uk/tiles/map.html#";
    4041  var persistentTag = "favourite_postcode";
    4142
     
    5960        var friends = data.get("viewerFriends").getData();
    6061        friends.each(function(person) {
    61                 var postcode = "(not set)";
     62                var postcodeText = "(not set)";
    6263                var mapDiv = " <span id='" + person.getId() + "'></span>";
    6364
     
    6667                        postcode = theirData[persistentTag];
    6768                        postcodes[person.getId()] = postcode;
     69                        postcodeText = " - " + postcode;
    6870                }
    6971                html += "<li>" +
    70                         person.getDisplayName() + " " + postcode + mapDiv +
     72                        person.getDisplayName() + " " + postcodeText + mapDiv +
    7173                        "</li>";
    7274        });
     
    168170                }
    169171
    170                 map.innerHTML = "<img src='" + tile + "' alt='Map of " +
    171                         json["pc"] + "' " + js + " />";
     172                map.innerHTML = "<a href='" + mainSite + tile_e + "," +
     173                        tile_n + ",1'><img src='" + tile + "' alt='Map of " +
     174                        json["pc"] + "' " + js + " /></a>";
    172175        } else {
    173176                map.innerHTML = "No map found for postcode " + searchPC + ", sorry";
Note: See TracChangeset for help on using the changeset viewer.