Hi!
I have two different applications one test-application that displays a map and another one that is just a server application.
Both have worked fine for a long time but recently I got a complaint for a calculated distance.
When I run my server application I get approx: 9.75 km.
Using the test-application I get approx: 15.7 km which seems much better.
The positions are:
Start Lat: 59.2686233333333
Long: 18.019825
Stop Lat: 59.3085966666667
Long: 18.2301466666667
Im using MapPoint 2006 (Europe)
The code for the server application looks like:
Map map = MapPointApp.ActiveMap;
map.ActiveRoute.Clear(); //clear the route if one exists
Route route = map.ActiveRoute;
route.Waypoints.Add(fromLocation, "Start");
route.Waypoints.Add(toLocation, "End");
route.Calculate();
return route.Distance;
And the code for the test-application looks like:
axMappointControl1.ActiveMap.ActiveRoute.Clear(); //clear the route if one exists
Route oRoute = axMappointControl1.ActiveMap.ActiveRoute;
oRoute.Waypoints.Add(FromLocation, "Start");
oRoute.Waypoints.Add(ToLocation, "End");
oRoute.Calculate();
axMappointControl1.ItineraryVisible = false; //hide the directions pane
MessageBox.Show(oRoute.Distance + " km");
Any help would be appreciated / Michael