I am not sure which version you are trying to use now? You can get the version information by calling the static API WinformsMap.GetVersion.
In latest version(3.1.299 or later), I tested against the following code, it works fine: private void DisplayMap_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay(); winformsMap1.Overlays.Add(worldMapKitDesktopOverlay);
winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2);
winformsMap1.CenterAt(new Feature(-10.0,-1.2)); double scale = new ZoomLevelSet().ZoomLevel10.Scale; winformsMap1.ZoomToScale(scale);
So do you mean the Yale’s sample code can work but yours can not. If like that, please make a small sample to reproduce this problem to us. Or can you explain it more clear?
I have made an sample app,trying to reproduce the problem (can’t reproduce in sample app)
The control in the Production code, have the problem with not zooming out with the mouse wheel (if you start with zoom out) Zoomin works, if you after zooming in, try to zoom out the control works ok.
So button line: if start with zoom out, the control ignores the mousewheel zoom out. Zoom out by context menu, wooks fine.
The difference between sample and production, is there are defined some more layer, i will try to add them also, to see if that makes the difference.
Hope you can find which thing caused the problem. And also you can supply more information for us. Such as What is your threading mode set? It is the ThreadingMode property on the Map control. Do you use TileCache for overlay? What is your ZoomLevel Snapping mode set? It is the ZoomLevelSnapping property on the Map control.
Any strange code which you think may cause the problem you can tell us which will be helpful.