CurrentViewArea - wrong coordinates

Topics: Bugs
Nov 22, 2011 at 2:40 PM


Firstly thanks for that great piece of work...

I upgraded to Version and when I use GMapControl.CurrentViewArea.Left/Bottom/Right/Top I recieve very strange coordinate values. I think that the first used extent is now the reference for all extents afterwards.

The GMapControl.CurrentViewArea.Left value is always -180° when starting my application.

I also tested this issue with your Presentation project... having the same results...

double w = Math.Round(viaGMapControl.CurrentViewArea.Left, 3);
double s = Math.Round(viaGMapControl.CurrentViewArea.Bottom, 3);
double o = Math.Round(viaGMapControl.CurrentViewArea.Right, 3);
double n = Math.Round(viaGMapControl.CurrentViewArea.Top, 3);

Thanks for your help!!!

Best regards


Nov 22, 2011 at 2:48 PM

did you tested it without seeing the map, before form loaded?

Nov 22, 2011 at 3:20 PM

I checked the value


in the constructor of the application before setting the current position with e.g.


and afterwards.

It's twice the value -180°.

Nov 22, 2011 at 5:43 PM

constructor doesn't count, check the third time after form is loaded ;}

Nov 24, 2011 at 8:59 AM

Also after loading the form: The value is still -180° where it shouldn't be...

I haven't a clue why...


value is correct.

Nov 24, 2011 at 11:13 AM

i've just fixed it, should be ok

p.s. renamed from  CurrentViewArea -> ViewArea

Nov 24, 2011 at 11:14 AM

Muchos gratias!!!

Oct 30, 2013 at 10:10 AM
Hi Radioman and Nordberg,

If been busy with setting the zoom to have the maximum amount of (in)-zoom but still be able to display a complete route.

The 'ZoomAndCenterRoute'-instruction gives me not enough detail on the map ( too wide a zoom).

Now i tried this:

while (myMap.CurrentViewArea.Contains(markerStart.Position) == true && !myMap.CurrentViewArea.Contains(markerEnd.Position) == true)
            myMap.Zoom += 1;

But having same problem with version as Nordberg had. What can i do?