Changeset 213


Ignore:
Timestamp:
Oct 27, 2006, 8:50:05 PM (13 years ago)
Author:
Nick Burch
Message:

Include the lat+long in the details box

File:
1 edited

Legend:

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

    r203 r213  
    134134
    135135function showMarkerWindow(x,y, postcode, easting, northing, source, id) {
    136    $('location_detail').innerHTML = easting + ", "+northing;
     136   // Compute lat+long
     137   var en = new OSRef(easting,northing);
     138   var latlong = en.toLatLng();
     139   var lat = Math.round(latlong.lat*10000) / 10000;
     140   var lng = Math.round(latlong.lng*10000) / 10000;
     141
     142   // Display
     143   $('location_detail').innerHTML = easting + ", "+northing + "<br />" + lat + " " + lng;
    137144   $('postcode_detail').innerHTML = postcode
    138145   $('source_detail').innerHTML = "Source: " + ((source == 0) ? 'this site' : '<a href="http://www.freethepostcode.org/">freethepostcode.org</a>');
Note: See TracChangeset for help on using the changeset viewer.