This project has moved. For the latest updates, please go here.

Getting clear maps rendered

Topics: SharpMap Project, SharpMap v0.9 / v1.x, WinForms Controls
Oct 11, 2009 at 5:12 PM


I am developing a wpf application using sharpmap and postgresql. The problem I am having is that, the maps I rendered are not clear when I zoomed them. I did change the resolution of bmp bitmap, but it didnt work.

I get the vector layers from the postgis database. And the map is rendered on an image control using this code. 

The code I am using is;

myMap = new MapBase.MapManager();
           Path = new PathIndicator.PathManager();

           //convert System.Drawing.Image to WPF image
           System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(myMap.Map.GetMap());

           IntPtr hBitmap = bmp.GetHbitmap();
           System.Windows.Media.ImageSource WpfBitmap = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());
           imgCurrent.Source = WpfBitmap;

What is the issue? What should I do to get clear maps even when I zoom them?



Oct 12, 2009 at 4:32 PM


I have posted a reply to this here: