Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Directions from Lat/Long within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am having a problem getting directions between two locations created with only Lat/Long. I don't care if the locations ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Directions from Lat/Long Does every coordinate have a different ideal altitude? How would I know that the route planner got lost on local roads? |
| |||
|
I found this post: http://www.mp2kmag.com/mappoint/disc...ght=directions I wonder if my problem has something to do with my preferred roads settings. I'll try it next time I have a chance. Until then can someone please offer some input. |
| |||
|
Hi, You have to set altitude to 1 as in the example. This is for most of the MP geo things to have some accuratie.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
I've tried with the altitude set to 1 and I get the same results. Here is exaclty what some of the directions look like: Quote:
|
| |||
|
I made the application visible so I could see the routes for myself and found out that it is starting the routes from the center of "Eastern GMT 5" rather than the location that I specified. I will continue to investigate. |
| |||
|
I found the problem: The ObjectsFromPoint method is returning the center of Eastern GMT 5 as the closest object. This only happens when there aren't any addresses nearby. What I did to fix the problem: Since I do not require an address for my start point (vehicle GPS location), I simply used the getLocation method on the start point. In my original build this was how it was done, but then I required an address for the end point and that is how I lost track of the requirement for the start point. Everything is fine now. |
| |||
|
Hi, Good that it is solved. But I do not understeand how (my English is not my native language). Can you elaborate more please ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Following is the flawed code: Code: 1: location = map.GetLocation(latitude, longitude, altitude);
2: location.goTo();
3: results = map.ObjectsFromPoint(map.locationToX(location), map.locationToY(location));
4: foreach(object sample in results)
5: {
6: if(sample is Location)
7: {
8: if(!findAddress || sample.StreetAddress != null)
9: return sample;
10: }
11: }
Code: 1: location = map.GetLocation(latitude, longitude, altitude);
2: location.goTo();
3: results = map.ObjectsFromPoint(map.locationToX(location), map.locationToY(location));
4: if(findAddress)
5: {
6: foreach(object sample in results)
7: {
8: if(sample is Location)
9: {
10: if(sample.StreetAddress != null)
11: return sample;
12: }
13: }
14: }
15: return location;
|
| |||
|
Hi, Thanks for feedback
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| directions, lat or long |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Directions Formatting | EdB | MapPoint 2006/2009 Discussion | 0 | 08-15-2005 10:27 AM |
| MapPoint and Bad Directions --- | SheilaSheila | MapPoint 2006/2009 Discussion | 2 | 01-24-2005 11:42 AM |
| driving directions | impala454 | MapPoint 2006/2009 Discussion | 1 | 12-11-2004 09:49 AM |
| Bug with Waypoints in Directions | Anonymous | MapPoint 2006/2009 Discussion | 3 | 07-21-2003 03:02 PM |
| Location of directions | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-14-2003 02:06 AM |
Thassos Holidays
Visit an unspoilt and beautiful Greek island with Thassos holidays available through UlookUbook.