Changeset 80


Ignore:
Timestamp:
Oct 19, 2006, 1:39:44 PM (13 years ago)
Author:
David Sheldon
Message:

attempts to make marker display faster and fix ticket:20 in IE.

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

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/static/tiles/grid.css

    r50 r80  
    1010      position: absolute;
    1111      visibility: hidden;
    12                         z-index: 1
     12                        z-index: 1;
    1313    }
    1414    #postcode_form {
     
    2121      width: 300px;
    2222      height: 100px;
    23                         z-index: 1
     23                        z-index: 10;
    2424    }
    2525
  • trunk/npemap.org.uk/static/tiles/map.html

    r66 r80  
    7070</div>
    7171</div>
    72 
    7372    </body>
    7473</html>
  • trunk/npemap.org.uk/static/tiles/mapTiles.js

    r66 r80  
    145145var screenWidth = YAHOO.util.Dom.getViewportWidth();
    146146var screenHeight = YAHOO.util.Dom.getViewportHeight();
     147var bottomLeft = new Array();
    147148
    148149function doResize() {
     
    152153  refreshGrid();
    153154}
     155
    154156function drawTable() {
    155157  sizeGridX = Math.round((screenWidth / tileWidth)-2)
     
    214216
    215217function drawExisting() {
     218  bottomLeft = YAHOO.util.Dom.getXY('element1.1');
    216219  var url = "../../cgi/get-postcodes.fcgi";
    217220  url += "?mineasting=" + minEasting + "000&maxeasting="  + maxEasting + "000&minnorthing=" + minNorthing + "000&maxnorthing=" + maxNorthing+"000";
     
    251254
    252255  var newMarker = document.createElement('div');
    253   newMarker.innerHTML = "<img src='../images/green-marker.gif' title='"+postcode+"'/>";
     256        var img=document.createElement('img');
     257        img.title = postcode;
     258        img.src = "../images/green-marker.gif";
     259        newMarker.appendChild(img);
    254260  newMarker.style.position = 'absolute';
     261        newMarker.style.zIndex = 1;
    255262  document.getElementById('main_page').appendChild(newMarker);
    256263
     
    259266  var x = ((easting / 1000) - minEasting) * tileWidth;
    260267  var y = ((northing / 1000) - minNorthing) * tileHeight;
    261   var bl = YAHOO.util.Dom.getXY('element1.1');
    262   var bottom = bl[1] + tileHeight;
    263 
    264   YAHOO.util.Dom.setXY(newMarker, [bl[0]+x-markerXOffset, bottom- (y+markerYOffset)]);
     268  var bottom = bottomLeft[1] + tileHeight;
     269
     270  YAHOO.util.Dom.setXY(newMarker, [bottomLeft[0]+x-markerXOffset, bottom- (y+markerYOffset)]);
    265271}
    266272
     
    296302
    297303
     304
Note: See TracChangeset for help on using the changeset viewer.