diff --git a/GMap.NET.Core/GMap.NET.Internals/Core.cs b/GMap.NET.Core/GMap.NET.Internals/Core.cs
index 74bc9a24..10b493a0 100644
--- a/GMap.NET.Core/GMap.NET.Internals/Core.cs
+++ b/GMap.NET.Core/GMap.NET.Internals/Core.cs
@@ -35,6 +35,7 @@ internal class Core : IDisposable
public GPoint mouseLastZoom;
public MouseWheelZoomType MouseWheelZoomType = MouseWheelZoomType.MousePositionAndCenter;
+ public bool MouseWheelZoomEnabled = true;
public PointLatLng? LastLocationInBounds = null;
public bool VirtualSizeEnabled = false;
diff --git a/GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs b/GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs
index 8ad40124..2b5467d5 100644
--- a/GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs
+++ b/GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs
@@ -138,6 +138,23 @@ public MouseWheelZoomType MouseWheelZoomType
}
///
+ /// enable map zoom on mouse wheel
+ ///
+ [Category("GMap.NET")]
+ [Description("enable map zoom on mouse wheel")]
+ public bool MouseWheelZoomEnabled
+ {
+ get
+ {
+ return Core.MouseWheelZoomEnabled;
+ }
+ set
+ {
+ Core.MouseWheelZoomEnabled = value;
+ }
+ }
+
+ ///
/// text on empty tiles
///
public string EmptyTileText = "We are sorry, but we don't\nhave imagery at this zoom\nlevel for this region.";
@@ -2266,6 +2283,8 @@ protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
+ if (MouseWheelZoomEnabled)
+ {
if (mouseIn && (!IsMouseOverMarker || IgnoreMarkerOnMouseWheel) && !Core.IsDragging)
{
if (Core.mouseLastZoom.X != e.X && Core.mouseLastZoom.Y != e.Y)
@@ -2323,6 +2342,7 @@ protected override void OnMouseWheel(MouseEventArgs e)
}
Core.MouseWheelZooming = false;
+ }
}
}
#endif