I want to save current map view settings when terminating the program, and restore it back after reopen. But I dont wants to save the map, only these settings. But it seems something is wrong and I cannot figure it out at the moment. When Iexecute this peace of code in 1 block nothing should happen, but the altitude becomes bigger and the map move to south and west. Someone has an idea wy ?
Code:double Lat; double Lon; double Alt = MP.ActiveMap.Altitude; Int32 x = MP.Height / 2; Int32 y = MP.Width / 2; Location Loc = MP.ActiveMap.XYToLocation(x, y); pos.CalcPos(Loc, out Lat, out Lon); MP.ActiveMap.GoToLatLong(Lat, Lon, Alt);