This project has moved and is read-only. For the latest updates, please go here.

Mouse Wheel stops working after Map is moved

Topics: SharpMap v2.0, WinForms Controls
Feb 10, 2013 at 10:53 PM
Edited Feb 10, 2013 at 10:54 PM

I have this scenario:
  1. Used "TileAsyncLayer" to fetch maps from OSM (OsmTileSource).
  2. Set the layer in 1.) as a Background layer of a MapBox.Map
  3. Added a single VariableLayer to MapBox.Map
  4. Added a few Static Layers to the MapBox.Map
Upon load, zoom in/out using the mouse wheel works.
But, after map is moved (dragged), zooming in/out using the mouse wheel stops working.

Below are my Map Box settings:
            _mapBox.ActiveTool = SharpMap.Forms.MapBox.Tools.Pan;
            _mapBox.Cursor = System.Windows.Forms.Cursors.Hand;
            _mapBox.ShowProgressUpdate = true;
            _mapBox.Size = new System.Drawing.Size(800, 600);
            _mapBox.TabIndex = 7;
            _mapBox.Text = "mapBox1";
            _mapBox.FineZoomFactor = 10D;
            _mapBox.WheelZoomMagnitude = 2D;
            _mapBox.ZoomToPointer = true;
            _mapBox.PreviewMode = SharpMap.Forms.MapBox.PreviewModes.Fast;
            _mapBox.QueryGrowFactor = 5F;
            _mapBox.QueryLayerIndex = 0;
Your help will be greatly appreciated.

Thank you very much.