Holding Shift + Drag works fine ... doing it programmatically ... the zoom is not ok.
That made me think about the problem, I found a solution. But I dont know if the problem is from me or in the the zoom function. I guess I am wrong.
I am used to work with gfx both in 2d and 3d ... and the latitude is a bit confusing since Top is 90 and Bottom is 90. So to be able to do easy computation with RectLatLng ... the HeightLat must be negative, but the zoom function want it positive.
if (checkBoxGPXAutoZoom.Checked)
{
RectLatLng temp = new RectLatLng();
temp = zoomRect;
temp.HeightLat = temp.HeightLat;
gMapControl.SetZoomToFitRect(temp);
}
This invert my negative latitude height and the zoom is fine.
To follow every other rectangle class ... they all have some thing like : x, y, width, height.
To get top left corner ... you have : x, y
To get bottom right corner you do : x+width, y+height
So for your rect to follow standard, with latitude axe inverted ... you need to have negative height to be able to compute bottom right corner using : r.lat+r.heightlat !
It will be simpler for me to modify it on my side, at the one place I will autozoom ;)
