Hi ThinkGeo,
How to control mouse wheel in Client code to avoid unnecessary zooms? Is it possible via C# code setting?
If the mouse wheel is moved within a certain time interval then it should be ignored.
Regards,
Anil
Hi ThinkGeo,
How to control mouse wheel in Client code to avoid unnecessary zooms? Is it possible via C# code setting?
If the mouse wheel is moved within a certain time interval then it should be ignored.
Regards,
Anil
Hi Anil,
Yes, we can manage this with the help of IsMouseWheelDisabled property of MouseMapTool. Please refer to the installation sample “Samples/NavigateTheMap/PanTheMap.aspx” for detail.
Thanks,
Johnny
Hi Anil,
Some supplementary hints:
1. Create a global Stopwatch for recording the time interval.
2. Attach the ExtentChanged event to map control.
3. Start the stopwatch in ExtentChanged event if the map’s zoom begin to change. And then check if the timespan of the stopwatch has excessed the specified time interval, if in that case, disable the IsMouseWheel of MouseMapTool. Here please make sure we just trace the change of the zoom instead of current extent.
Hope the above is helpful to you. Thanks,
Johnny