ThinkGeo.com    |     Documentation    |     Premium Support

Zooming out geo tiff raster layers problem

Hi,



I found a problem with WinformsMap control when I changing zoom levels (Map Suite 4.0.40.0 desktop edition).

I added a few tiff raster layers to my project, and when I was zooming out project to ZoomLevel1 then exception was thrown:



"Parametr jest nieprawidłowy.



   w System.Drawing.Bitmap..ctor(Stream stream)

   w ThinkGeo.MapSuite.Core.GdiPlusGeoCanvas.DrawScreenImageWithoutScalingCore(GeoImage image, Single centerXInScreen, Single centerYInScreen, DrawingLevel drawingLevel, Single xOffset, Single yOffset, Single rotateAngle)

   w ThinkGeo.MapSuite.Core.GeoCanvas.DrawWorldImageWithoutScaling(GeoImage image, Double centerXInWorld, Double centerYInWorld, DrawingLevel drawingLevel, Single xOffset, Single yOffset, Single rotateAngle)

   w ThinkGeo.MapSuite.Core.GeoCanvas.DrawWorldImageWithoutScaling(GeoImage image, Double centerXInWorld, Double centerYInWorld, DrawingLevel drawingLevel)

   w ThinkGeo.MapSuite.Core.RasterLayer.DrawCore(GeoCanvas canvas, Collection`1 labelsInAllLayers)

   w ThinkGeo.MapSuite.Core.Layer.Draw(GeoCanvas canvas, Collection`1 labelsInAllLayers)

   w ThinkGeo.MapSuite.DesktopEdition.LayerOverlay.DrawCore(GeoCanvas canvas)

   w ThinkGeo.MapSuite.DesktopEdition.Overlay.MainDraw(GeoCanvas canvas)

   w ThinkGeo.MapSuite.DesktopEdition.Overlay.Draw(GeoCanvas canvas)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x03e3d48bcfe7bb6c(IEnumerable`1 xa6f0db4f183189f1)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xff5b27c00f9678c2(RectangleShape x178b193eec228e6e)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xe3cee4adb9c72451()

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.x9ac8c50f434f4b39(Int32 xb565f4681f05557a)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xc8fbf8304fe7558e(InteractionArguments x195facd4ef5d753d)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xfeca3317d3c75bbb(Object xd9272088e65bd176, x6a8380ab1a7ebb4c xc2fd4c0ed406cdb7)

   w ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.OnMouseEvent(x6a8380ab1a7ebb4c e)

   w ThinkGeo.MapSuite.DesktopEdition.x5cd462d41be2f68a.AnalyseMouseWheel(Double screenX, Double screenY, Double worldX, Double worldY, Int32 delta)

   w ThinkGeo.MapSuite.DesktopEdition.WinformsMap.xb0cb8571d4771126(Object xd9272088e65bd176, MouseEventArgs xc2fd4c0ed406cdb7)"





Below you can find link to demo application which shows my problem:


doc.abakus.net.pl/LayersZoomingDemo.zip



Is there any way to solve this problem ? 



Thank you.



Chris



Chris, 
  
 Thanks for your detail information; the stack-trace and demo are very helpful to find your problem quickly. 
 I can reproduce your problem by testing your demo, the reason is that when you zoom out far away, the tiff image will smaller and smaller, it will be less than one pixel. 
 We have fixed this problem by adding a check, if its width or height less than one pixel, we don’t display it. 
 You can get the latest version 4.5.32.0 and try it again. 
  
 Please let me know if you have more question. 
  
 Thanks 
 James