Changeset 58


Ignore:
Timestamp:
Oct 16, 2006, 1:24:09 PM (13 years ago)
Author:
David Sheldon
Message:

More IE integration. Need to use the Yahoo event model.

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

Legend:

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

    r57 r58  
    44  <title>England and Wales maps</title>
    55</head>
     6<script src="yahoo.js"></script>
     7<script src="dom.js"></script>
    68
    79<body>
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r53 r58  
    115115}
    116116
     117// Need to use substring for IE, and it doesn't take negative numbers.
     118function trimNumber(string) {
     119  str = '000' + string
     120        return str.substring(str.length -3)
     121}
    117122
    118123function refreshGrid() {
     
    121126                for(var y=1; y<=sizeGridY; y++) {
    122127            // Update the table using the array data from position 0,0.
    123             tileX = ('000'+(x+offsetGridX-Math.round(sizeGridX/2))).substr(-3);
    124             tileY = ('000'+(y+offsetGridY-Math.round(sizeGridY/2))).substr(-3);
     128            tileX = trimNumber(x+offsetGridX-Math.round(sizeGridX/2));
     129            tileY = trimNumber(y+offsetGridY-Math.round(sizeGridY/2));
    125130            document.getElementById('element' + x + '.' + y).src = prefix+tileX+'/'+ tileY + '.jpg';
    126131        }
     
    149154var successHandler = function(o){
    150155  eval(o.responseText); 
     156        //alert(o.responseText);
    151157}
    152158
    153159var failHander = function(o) {
    154160  // Don't do anything
    155   //alert("Failed");
     161  alert("Failed");
    156162}
    157163
Note: See TracChangeset for help on using the changeset viewer.