Changeset 203 for trunk/npemap.org.uk
- Timestamp:
- Oct 26, 2006, 11:19:49 PM (14 years ago)
- Location:
- trunk/npemap.org.uk/static/tiles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/static/tiles/grid.css
r189 r203 16 16 background-color: white; 17 17 border: 1px solid black; 18 padding: 20px;18 padding: 15px; 19 19 position: absolute; 20 20 display: none; 21 21 width: 300px; 22 22 height: 120px; 23 z-index: 10; 24 } 25 #postcode_detail_window { 26 line-height: 100%; 27 background-color: white; 28 border: 1px solid black; 29 display: none; 30 padding: 10px; 31 position: absolute; 32 width: 300px; 33 height: 70px; 23 34 z-index: 10; 24 35 } -
trunk/npemap.org.uk/static/tiles/map.html
r189 r203 66 66 </div> 67 67 </div> 68 <div id="postcode_detail_window"> 69 <div style="float:right"><a href="javascript:hideMarkerWindow()" title="close">X</a></div> 70 <div><span class="terms" id="location_detail"></span></div> 71 <div><span class="terms" id="postcode_detail"></span></div> 72 <div><span class="terms" id="source_detail"></span></div> 73 <span class="terms">This will contain a form to report a problem with this postcode, in the meantime email us.</span> 74 </div> 68 75 <div id="postcode_form"> 69 76 <form method="post" action="../../cgi/submit.fcgi"> -
trunk/npemap.org.uk/static/tiles/mapTiles.js
r195 r203 113 113 postcodeFormElement.style.display = 'block'; 114 114 YAHOO.util.Dom.setXY(postcodeFormElement, [Math.max(0, (x-50)), (y-180) < 0 ? (y+10):(y-180)]); 115 fixIE(postcodeFormElement);116 115 $('location').innerHTML = easting + ', ' + northing ; 117 116 $('easting').value = easting; … … 132 131 postcodeFormElement.style.display = 'none'; 133 132 markerElement.style.visibility = 'hidden'; 133 } 134 135 function showMarkerWindow(x,y, postcode, easting, northing, source, id) { 136 $('location_detail').innerHTML = easting + ", "+northing; 137 $('postcode_detail').innerHTML = postcode 138 $('source_detail').innerHTML = "Source: " + ((source == 0) ? 'this site' : '<a href="http://www.freethepostcode.org/">freethepostcode.org</a>'); 139 $('postcode_detail_window').style.display = 'block'; 140 YAHOO.util.Dom.setXY('postcode_detail_window', [Math.max(0, (x-50)), (y-100) < 0 ? (y+10):(y-100)]); 141 } 142 143 function hideMarkerWindow() { 144 $('postcode_detail_window').style.display = 'none'; 134 145 } 135 146 … … 186 197 187 198 188 function fixIE(hoverDiv) {189 if (document.all)190 {191 hoverDiv.zIndex = 10;192 }193 }194 195 196 199 function initializePage() { 197 200 mapContainerElement = $('map_container'); … … 351 354 newMarker = markers[nextMarker]; 352 355 var img=newMarker.firstChild; 353 img.title = postcode;354 img.src = markerColours[source];355 356 newMarker.style.visibility = 'visible'; 356 357 } … … 358 359 newMarker = document.createElement('div'); 359 360 var img=document.createElement('img'); 360 img.title = postcode;361 img.src = markerColours[source];362 361 newMarker.appendChild(img); 363 362 newMarker.style.position = 'absolute'; … … 366 365 mainPageElement.appendChild(newMarker); 367 366 } 367 img.title = postcode; 368 img.src = markerColours[source]; 369 368 370 nextMarker = nextMarker + 1; 369 371 … … 371 373 var x = ((easting / 1000) - minEasting) * tileWidth; 372 374 var y = ((northing / 1000) - minNorthing) * tileHeight; 375 376 newMarker.onclick = function(e) { 377 e = YAHOO.util.Event.getEvent(e); 378 var x = YAHOO.util.Event.getPageX(e); 379 var y = YAHOO.util.Event.getPageY(e); 380 showMarkerWindow(x,y, postcode, easting, northing, source, id); }; 373 381 374 382 // YAHOO.util.Dom.setXY(newMarker, [bottomLeft[0]+x-markerXOffset, bottom- (y+markerYOffset)]);
Note: See TracChangeset
for help on using the changeset viewer.