crossed blank map - Google map

Topics: Windows Forms
Feb 29, 2012 at 6:00 PM

Hi!

I currently have map provider as GoogleMap. When i try to change provider like as GoogleHybridMap, GoogleSatelliteMap or GoogleTerrainMap it occurs crossed blank map.

Any idea?

Coordinator
Feb 29, 2012 at 6:33 PM

nop

Feb 29, 2012 at 7:20 PM

Looks like it's problem with GDI+ (http://greatmaps.codeplex.com/discussions/264806). I try to fix problem with changing that line, but not exist anymore.

Coordinator
Mar 1, 2012 at 6:54 AM

do you use winxp?

Mar 1, 2012 at 8:37 AM

I use vista.

Error details:

System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.

at GMap.NET.WindowsForms.GMapControl.DrawMap(Graphics g) in C:\Users\Admin\Desktop\gmap\WindowsFormsApplication1\GMap.NET.WindowsForms\GMap.NET.WindowsForms\GMapControl.cs:line 607

   at GMap.NET.WindowsForms.GMapControl.OnPaint(PaintEventArgs e) in C:\Users\Admin\Desktop\gmap\WindowsFormsApplication1\GMap.NET.WindowsForms\GMap.NET.WindowsForms\GMapControl.cs:line 1398

Coordinator
Mar 1, 2012 at 8:42 AM

plain vista or with service packs?

Mar 1, 2012 at 8:46 AM

Vista Bussiness, Service pack 2

Coordinator
Mar 1, 2012 at 8:52 AM

hm, did you tried to set True in that function call mentioned above?

Mar 1, 2012 at 8:57 AM
Edited Mar 1, 2012 at 9:12 AM

in WindowsFormsImage.cs

i change this line Image m = Image.FromStream(stream, true, VistaOrLater ? false : true);

to Image m = Image.FromStream(stream, true, true);

and now works.

Coordinator
Mar 1, 2012 at 11:29 AM

roger, fixed