Zooming with the mouse wheel does not work


When I scroll the wheel, I see that VEMap.OnMouseWheel() is called and eventually PublicEventsGlobeControl.DoMouseWheel() is called. But the map never zooms in. Do I need to 'turn on' this functionality somehow?


amicenko wrote Sep 1, 2009 at 2:50 AM

I had a look with Reflector at the Microsoft.MapPoint.Rendering3D.InputManager class.
It's calling Host.PointToScreen(e.Location), which for me is returning something with an X value around -1500. That might be valid (I haven't looked a lot at how this control works but I did read that it creates an off-screen window to get a rendering context). However, it tries to get the window corresponding to that location and fails.

As a temporary workaround I changed PublicEventsGlobeControl.OnMouseWheel to this:
    protected override void OnMouseWheel(MouseEventArgs e)
Seems to work, but it zooms to the centre of the screen and not to the mouse location.

JoshB wrote Sep 1, 2009 at 4:11 AM

Interesting, thanks. I'll research that and incorporate it into the next release.

wrote Jan 4, 2010 at 3:44 AM

wrote Feb 14, 2013 at 3:02 AM

wrote May 16, 2013 at 8:27 AM

wrote May 16, 2013 at 8:27 AM

wrote Jun 14, 2013 at 7:08 AM