source: trunk/npemap.org.uk/static/tiles/allmaps.html

Last change on this file was 414, checked in by Nick Burch, 15 years ago

New thumbnails, which include the bits of Scotland that we have

File size: 980 bytes
Line 
1
2<html>
3<head>
4  <title>England and Wales maps</title>
5</head>
6<script src="yahoo.js"></script> 
7<script src="dom.js"></script> 
8<script src="event.js"></script> 
9
10<body>
11<p>
12Click on the map to zoom in.
13</p>
14<a href="#" id="link">
15<img src="thumbnail.jpg" style="border: none" />
16</a>
17</body>
18
19<script type="text/javascript">
20// The X offset
21// (The number of pixels that were trimmed from the left of the thumbnail
22//   image, when it was created to start at 0,0)
23var xOffset = 77;
24
25function click(e) {
26       
27  e = YAHOO.util.Event.getEvent(e);
28  var img = YAHOO.util.Event.getTarget(e);
29  var imgPos = YAHOO.util.Dom.getXY(img);
30        var x = xOffset + YAHOO.util.Event.getPageX(e) - imgPos[0];
31        var y = img.height-(YAHOO.util.Event.getPageY(e) - imgPos[1]);
32
33        var s6x = Math.round(x/6);
34        var s6y = Math.round(y/6);
35
36        window.location=("map.html#" + s6x + "," + s6y + ",3");
37
38        YAHOO.util.Event.stopEvent(e);
39}
40
41  YAHOO.util.Event.addListener("link", "click", click);
42
43</script>
44
45</html>
Note: See TracBrowser for help on using the repository browser.