PageRenderTime 64ms CodeModel.GetById 53ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/WUW01/bin/Debug/temp/test.html

https://bitbucket.org/Skriglitz/sixthsense
HTML | 64 lines | 59 code | 5 blank | 0 comment | 0 complexity | 4d015ff36522badedadcaf9c33b4199b MD5 | raw file
 1<html>
 2   <head>
 3      <title></title>
 4      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 5      <script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script>
 6      <script>
 7      var map = null;
 8
 9    function SetZoomLevel(zLev)
10    {
11         map.SetZoomLevel(zLev);
12    }
13
14    function myClickHandler(e)
15    {
16        var x = e.mapX;
17        var y = e.mapY;
18        var pixel = new VEPixel(x, y);
19        var LL = map.PixelToLatLong(pixel);
20        if(e.leftMouseButton)
21            var events = "snParameter: CLICKEVENT LEFT, " + LL;
22        if(e.rightMouseButton)
23           var events = "snParameter: CLICKEVENT RIGHT, " + LL;
24        window.navigate(events);
25    }
26
27    function myMouseMoveHandler(e)
28    {
29        var x = e.mapX;
30        var y = e.mapY;
31        var pixel = new VEPixel(x, y);
32        var LL = map.PixelToLatLong(pixel);
33        var events = "snParameter: MOVEEVENT MOUSE, " + LL;
34        window.navigate(events);
35    }
36
37    function AddPin(pinID, posit, descr, iconAddress)
38    {   
39        var pin = new VEPushpin(
40        pinID, 
41        posit, 
42        iconAddress, 
43        descr, 
44        ''
45        );
46       pin.ShowDetailOnMouseOver=false;
47       map.AddPushpin(pin);
48    }
49
50      function GetMap()
51      {
52         map = new VEMap('myMap');
53         map.LoadMap(new VELatLong( 45.850816,9.3956833), 10 ,'h' , false);
54         map.SetZoomLevel(12);
55         map.SetMapStyle("r");
56         map.AttachEvent('onclick', myClickHandler); 
57         map.AttachEvent('onmousemove', myMouseMoveHandler);
58      }   
59      </script>
60   </head>
61   <body onload="GetMap();">
62      <div id='myMap' style="position:relative; width:1024px; height:768px;"></div>
63   </body>
64</html>