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

Last change on this file since 133 was 133, checked in by David Sheldon, 13 years ago

Might be a fix for ticket:34, also made the report bug page more clear about its broken state.

File size: 842 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">
20var xOffset = 124;
21
22function click(e) {
23       
24  e = YAHOO.util.Event.getEvent(e);
25  var img = YAHOO.util.Event.getTarget(e);
26  var imgPos = YAHOO.util.Dom.getXY(img);
27        var x = xOffset + YAHOO.util.Event.getPageX(e) - imgPos[0];
28        var y = img.height-(YAHOO.util.Event.getPageY(e) - imgPos[1]);
29
30        var s6x = Math.round(x/6);
31        var s6y = Math.round(y/6);
32
33        window.location=("map.html#" + s6x + "," + s6y + ",3");
34
35        YAHOO.util.Event.stopEvent(e);
36}
37
38  YAHOO.util.Event.addListener("link", "click", click);
39
40</script>
41
42</html>
Note: See TracBrowser for help on using the repository browser.