Community of VE/MapPoint Users and Developers
This is a discussion on Different results from ActiveX Control and API within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi! I have two different applications one test-application that displays a map and another one that is just a server ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Different results from ActiveX Control and API 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 |
| |||
| Re: Different results from ActiveX Control and API
Michael, I plotted the route and got all highway 16.x km Are the "Preferred" settings different on the machines? Mike Mattys |
| |||
| Re: Different results from ActiveX Control and API
Hi Mike! I'm not sure whatt settings you're referring to, but when I tried to figure out what was happening I ran both applications on the same machine. When you say "plotted the route" I assume that you used the ActiveX control. So it seems that using that you get almost the same result as I do. It's the other result when I'm using the "Microsoft MapPoint 13.0 Object Library (Europe)" that I get the strange distance. Regards / Michael |
| |||
| Re: Different results from ActiveX Control and API
Hi, Possible the default preferred settings are different using the object model versus the activeX control. You have to set them in both of the programs the same.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Different results from ActiveX Control and API
Hi! No I deinstalled 2004 before installing 2006 and after reading your post I also searched my harddrive to make sure there was no old version of MappointControl.ocx laying around. Regards / Michael |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Apple Blog » Blog Archive » Different results from ActiveX Control and API | This thread | Pingback | 11-05-2007 04:57 PM | |
| Create 3D Map Video - Win a Free Zune from Microsoft - MapPoint News - MP2K Magazine | This thread | Refback | 11-05-2007 06:48 AM | |
| Merging Multiple Routes - MapPoint Articles - MP2K Magazine | This thread | Refback | 11-04-2007 04:15 PM | |
| Determing Whether A Point Is Located Inside Polygon - MapPoint Articles - MP2K Magazine | This thread | Refback | 11-02-2007 07:43 AM | |
| Programming MapPoint via .NET - MapPoint Articles - MP2K Magazine | This thread | Refback | 11-02-2007 07:38 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error using ActiveX control in VB 6 | bgower | MapPoint 2006/2009 Discussion | 2 | 09-16-2005 08:40 AM |
| Re: Keyboard control in mappoint activex control | djcapslock | MapPoint 2006/2009 Discussion | 1 | 03-10-2005 10:16 AM |
| mappoint ActiveX control 9.0 | Anonymous | MapPoint 2006/2009 Discussion | 1 | 10-21-2004 06:22 AM |
| ActiveX Control | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-04-2002 05:44 PM |
Cheap flights to Athens
Book cheap flights to Athens on Holiday Hypermarket and you can book some great value accommodation too! Check it out online.
Online Travel Agent
Travel Counsellors is a Queen's Award winning online Travel Agent. Book your travel online with one of our agents.
Flights Canada
Our search results will show you a selection of airlines, travel agents and tour operators offering cheap flights to Canada. See for yourself who has the cheapest deals.
Holidays to Dominican Republic
Holidays to Dominican Republic offer a wealth of natural beauty and magnificent views. Come alive in the splendor of the Dominican Republic!
Holidays
For bargain holidays to destinations including Mexico, South Africa, India and more, visit ULookUBook online today. Check out our free travel guides to help you make an informed decision for your holidays.
Cheap Travel
For cheap travel options, visit Travel.co.uk and explore the benefits of our comparison site.
Holidays in Sharm el Sheikh
Need booking info on holidays in Sharm el Sheikh? Visit On The Beach for more information!