View Single Post

  #2 (permalink)  
Old 12-25-2004
Wilfried Wilfried is offline
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

Possible there are other ways, but I tryed this one:

Code:
            double Lat;
            double Lon;
            Int32 x = MP.Height / 2;
            Int32 y = MP.Width / 2;
            double Alt = MP.ActiveMap.Altitude;
            Location Loc = MP.ActiveMap.XYToLocation(x, y);
            pos.CalcPos(Loc, out Lat, out Lon);
            Lat += 1;
            MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);
First the center points x, y of the map are calculated, then the current Altitude. The XYToLocation gives back the Location of the current center of the map. The CalcPos routine you will find it on this site (on another name), please try a searcht to 'reverse geocoding' to find it.

Then at last I change the Latiude and call the GoToLatLong method.

But like I say it seems a little overkill. Possible there is a simple function call to do this
Reply With Quote