Changeset 8
- Timestamp:
- Oct 10, 2006, 10:20:38 PM (15 years ago)
- Location:
- trunk/npemap.org.uk/static/tiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/static/tiles/map.html
r6 r8 4 4 <link rel="stylesheet" type="text/css" href="grid.css"> 5 5 </head> 6 <body onload="initializePage(); initialGrid();" >6 <body onload="initializePage(); initialGrid();" onResize="window.location.href = window.location.href;"> 7 7 <script src="mapTiles.js"></script> 8 8 <h1 id=theTitle>New popular mapping</h1> … … 43 43 <div id="grid" style="float:left"> 44 44 <table border=1 bgcolor="red" cellpadding="10" id="theTable"> 45 <img width=125 height=125 id=element1.4><img width=125 height=125 id=element2.4><img width=125 height=125 id=element3.4><img width=125 height=125 id=element4.4><img width=125 height=125 id=element5.4><img width=125 height=125 id=element6.4><br> 46 <img width=125 height=125 id=element1.3><img width=125 height=125 id=element2.3><img width=125 height=125 id=element3.3><img width=125 height=125 id=element4.3><img width=125 height=125 id=element5.3><img width=125 height=125 id=element6.3><br> 47 <img width=125 height=125 id=element1.2><img width=125 height=125 id=element2.2><img width=125 height=125 id=element3.2><img width=125 height=125 id=element4.2><img width=125 height=125 id=element5.2><img width=125 height=125 id=element6.2><br> 48 <img width=125 height=125 id=element1.1><img width=125 height=125 id=element2.1><img width=125 height=125 id=element3.1><img width=125 height=125 id=element4.1><img width=125 height=125 id=element5.1><img width=125 height=125 id=element6.1><br> 45 <script type="text/javascript"> 46 drawTable() 47 </script> 49 48 50 49 </table> -
trunk/npemap.org.uk/static/tiles/mapTiles.js
r6 r8 30 30 31 31 32 if (document.body.clientWidth) { 33 sizeGridX = Math.round(((document.body.clientWidth) / tileWidth)-2) 34 sizeGridY = Math.round(((document.body.clientHeight) / tileHeight)-1) 35 } 36 32 37 function zoomOut() { 33 38 if(zoomLevel == (prefixes.length-1)) { … … 57 62 refreshGrid(); 58 63 } 64 65 function drawTable() { 66 for(var y=sizeGridY; y>=1; y--) { 67 for(var x=1; x<=sizeGridX; x++) { 68 document.write('<img width=' + tileWidth + ' height=' + tileHeight + ' id=element' + x + '.' + y + '>') 69 } 70 document.write('<br>') 71 } 72 } 73 74 59 75 60 76
Note: See TracChangeset
for help on using the changeset viewer.