Changeset 546 for trunk


Ignore:
Timestamp:
May 7, 2007, 6:04:43 PM (13 years ago)
Author:
Nick Burch
Message:

Partial support for ie

Location:
trunk/npemap.org.uk/static/tiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/map.html

    r496 r546  
    9191      <form method="post" action="../../cgi/bad-postcode.fcgi" id="bad_form">
    9292      <input type="hidden" name="postcode" id="postcode_id_detail" />
     93      <input type="hidden" name="grid" id="grid2" />
    9394      <label for="reason"><span title="Why you think it is incorrect">Problem:</span></label>
    9495
     
    110111    <input type="hidden" id="returnX" name="returnX" />
    111112    <input type="hidden" id="returnY" name="returnY" />
     113    <input type="hidden" name="grid" id="grid" />
    112114    <div>
    113115      <input type="text" name="postcode1" id="postcode1" size="4" />
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r453 r546  
    1818
    1919var zoomLevel = 1;
     20var grid = 'osgb'; // One of osgb or osie, for now anyway
    2021
    2122var needCalibration = true;
     
    146147   $('reason_email').value= '';
    147148   $('reason').value= '';
     149   $('grid').value = grid;
     150   $('grid2').value = grid;
    148151   $('source_detail').innerHTML = ((source == 0) ? 'this site' : '<a href="http://www.freethepostcode.org/">freethepostcode.org</a>');
    149152   $('postcode_detail_window').style.display = 'block';
     
    297300      zoomLevel = urlterms[2]-0 ;
    298301    }
    299         }
     302
     303    grid = 'osgb';
     304    if(urlterms.length > 3) {
     305      if(urlterms[3] == 'ie') {
     306         grid = 'osie';
     307      }
     308    }
     309  }
    300310}
    301311
     
    492502                        maxEasting + "x" + minNorthing + "," +
    493503                        maxEasting + "x" + maxNorthing ;
     504                if(grid == 'osie') {
     505                        req = req + "&ie=yes";
     506                }
    494507
    495508                // Do the request
     
    528541}
    529542function getLink() {
    530   return offsetGridX + "," + offsetGridY + "," + zoomLevel;
     543  var link = offsetGridX + "," + offsetGridY + "," + zoomLevel;
     544  if(grid == 'osie') {
     545     link = link + ",ie";
     546  }
     547  return link;
    531548}
    532549
Note: See TracChangeset for help on using the changeset viewer.