How to disable Mouse wheel event?Can anyone help me how to disable mousewheel event for VE map? My application want to disable the mouse wheel action for zooming.© 2009 Microsoft Corporation. All rights reserved.Fri, 20 Nov 2009 22:09:23 Z7e67849e-c8ed-4626-94c6-1f13ad333a9ehttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#7e67849e-c8ed-4626-94c6-1f13ad333a9ehttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#7e67849e-c8ed-4626-94c6-1f13ad333a9eNAVI2http://social.msdn.microsoft.com/Profile/en-US/?user=NAVI2How to disable Mouse wheel event?Can anyone help me how to disable mousewheel event for VE map? My application want to disable the mouse wheel action for zooming.Tue, 29 May 2007 22:25:14 Z2007-05-29T22:25:14Zhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#a29553af-71b2-4563-93cc-19830a765504http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#a29553af-71b2-4563-93cc-19830a765504Derek Chan Oldhttp://social.msdn.microsoft.com/Profile/en-US/?user=Derek%20Chan%20OldHow to disable Mouse wheel event?<p>Sure, just override the behaviour of a mousewheel using VE Events.  Sample code that demonstrates this below:<br> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Snippet</span></div> <p><br>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;<a title="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&quot;&gt;<br>&lt;html&gt;<br>   &lt;head&gt;<br>      &lt;title&gt;&lt;/title&gt;<br>      &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br>      &lt;script src=&quot;<a href="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5&quot;&gt;&lt;/script">http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5&quot;&gt;&lt;/script</a>&gt;<br>      &lt;script&gt;<br>      var map = null;<br>            <br>      function GetMap()<br>      {<br>         map = new VEMap('myMap');<br>   map.LoadMap();<br>   map.AttachEvent(&quot;onmousewheel&quot;, ShapeHandler);<br>   }   <br>function ShapeHandler(e)<br>{<br>  return true;<br>}<br>      &lt;/script&gt;<br>   &lt;/head&gt;<br>   &lt;body onload=&quot;GetMap();&quot;&gt;<br>      &lt;div id='myMap' style=&quot;position:relative; width:400px; height:400px;&quot;&gt;&lt;/div&gt;<br>   &lt;/body&gt;<br>&lt;/html&gt;<br>      </p></div></div> <p> <br>Hope that helps,</p> <p></p>Wed, 30 May 2007 00:12:07 Z2007-05-30T00:12:07Zhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#21f014ba-e2b5-4791-bfd0-769577517882http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#21f014ba-e2b5-4791-bfd0-769577517882NAVI2http://social.msdn.microsoft.com/Profile/en-US/?user=NAVI2How to disable Mouse wheel event?thanx  Derek its working as per my requirment, its a very simple change <img height=19 alt=Smile src="http://forums.microsoft.com/MSDN/emoticons/emotion-1.gif" width=19>Wed, 30 May 2007 17:03:47 Z2007-05-30T17:03:47Zhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#ed1934b6-0ced-4f06-a550-d9bae5506a2ehttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#ed1934b6-0ced-4f06-a550-d9bae5506a2eymikhelhttp://social.msdn.microsoft.com/Profile/en-US/?user=ymikhelHow to disable Mouse wheel event?Hi,<br><br>What if I'd like to change map's event(s) to my handler upon certain conditions, and restore it to the native behaviour after? How do I get the native handler for a map's event(s)?<br><br>Regards,<br>Tue, 23 Oct 2007 11:51:34 Z2007-10-23T11:51:34Zhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#8f048530-25ec-4f44-abe8-ac1a8f4412fbhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#8f048530-25ec-4f44-abe8-ac1a8f4412fbCraig731http://social.msdn.microsoft.com/Profile/en-US/?user=Craig731How to disable Mouse wheel event?<div style="text-align:left"> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Block</span></div> <p>map.DetachEvent(&quot;[Handler]&quot;, &quot;function()&quot;);</p></div></div><br>That will cancel out your EventHandler<br></div>Tue, 23 Oct 2007 12:28:45 Z2007-10-23T12:28:45Zhttp://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#ca9e49e4-c468-40fa-b2fe-7094e3d77460http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/7e67849e-c8ed-4626-94c6-1f13ad333a9e#ca9e49e4-c468-40fa-b2fe-7094e3d77460Richard_Brundritthttp://social.msdn.microsoft.com/Profile/en-US/?user=Richard_BrundrittHow to disable Mouse wheel event?If you want to disable the zooming of the mouse wheel but still be able to scroll the page when over top of the map you can do what I did in the sample code below.<br><br> <div style="text-align:left"> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Block</span></div> <p>&lt;html&gt;<br>   &lt;head&gt;<br>      &lt;title&gt;&lt;/title&gt;<br>      &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br>      &lt;script src=&quot;http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6&quot;&gt;&lt;/script&gt;<br>      &lt;script&gt;<br>         var map = null;<br>         var pinID = 1;<br>         var y=0;<br>         function GetMap()<br>         {<br>            map = new VEMap('myMap');<br>            map.LoadMap();<br>            map.AttachEvent(&quot;onmousewheel&quot;, wheelCallback);<br>         }   <br>        <br>        function wheelCallback(e)<br>        {<br>            //returning true to cancel default action.<br>            <br>            window.scrollBy(0,-5*e.mouseWheelChange);<br><br>             return true;<br>        }<br>         <br>         function AddPin()<br>         {  <br>             try<br>             {<br>                  map.DeleteAllShapes();<br>                 var latlong=new VELatLong(parseFloat(document.getElementById('lat').value),parseFloat(document.getElementById('long').value));<br>                var shape = new VEShape( VEShapeType.Pushpin,latlong);<br>                map.AddShape(shape);<br>                map.SetCenterAndZoom(latlong, 15);<br>            }<br>            catch(e)<br>             {<br>                alert(e.message);<br>             }<br>         }   <br>      &lt;/script&gt;<br>   &lt;/head&gt;<br>&lt;body onload=&quot;GetMap();&quot;&gt;<br>&lt;div align=&quot;center&quot;&gt;<br>&lt;div id='myMap' style=&quot;position:relative; width:600px; height:400px;&quot;&gt;&lt;/div&gt;<br>Lat: &lt;INPUT id=&quot;lat&quot; type=&quot;text&quot; name=&quot;start&quot; value=&quot;0&quot;/&gt;<br>Long: &lt;INPUT id=&quot;long&quot; type=&quot;text&quot; name=&quot;end&quot; value=&quot;0&quot;/&gt;<br>&lt;INPUT id=&quot;addpin&quot; type=&quot;button&quot; value=&quot;Add Pin&quot; name=&quot;addpin&quot; onclick=&quot;AddPin();&quot;&gt;<br>&lt;/div&gt;<br>&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;<br>&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;End of page<br>   &lt;/body&gt;<br>&lt;/html&gt;</p></div></div><br></div>Tue, 23 Oct 2007 17:23:37 Z2007-10-23T17:23:37Z