Community of VE/MapPoint Users and Developers
This is a discussion on Draw a route between two LONGS LATS within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I m using Mappoint 2004 North America and I want two draw a route between two point(Longs and Lats) ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Draw a route between two LONGS LATS I m using Mappoint 2004 North America and I want two draw a route between two point(Longs and Lats) using C#.But I could not get any thing lke get direction or getroute..... Plz Help... Thanks |
| |||
|
Hi, This should get you started: Code: double Alt = 1;
Location Loc;
Waypoint Way;
Map M = MP.ActiveMap;
Route R = M.ActiveRoute;
// if there was a previous active route then we clear it
R.Clear();
// set start point
Loc = M.GetLocation(Lat1, Lon1, Alt);
Way = R.Waypoints.Add(Loc, "");
Way.SegmentPreferences = GeoSegmentPreferences.geoSegmentQuickest;
// set waypoints
Loc = M.GetLocation(Lat2, Lon2, Alt);
Way = R.Waypoints.Add(Loc, "");
Way.SegmentPreferences = GeoSegmentPreferences.geoSegmentQuickest;
// set end point
Loc = M.GetLocation(Lat3, Lon3, Alt);
Way = R.Waypoints.Add(Loc, "");
Way.SegmentPreferences = GeoSegmentPreferences.geoSegmentQuickest;
R.DriverProfile.StartTime = System.DateTime.Now;
R.Calculate();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| draw, lats, longs, route |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Delete Numerator from waypoints when i draw a route | Genamo | MapPoint 2006/2009 Discussion | 0 | 02-23-2006 04:18 AM |
| How I can Disable the summary of map when I Draw a Route | Anonymous | MapPoint 2006/2009 Discussion | 1 | 03-09-2005 09:04 AM |
| Long Lats of Way points. | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-22-2005 03:54 AM |
| how to calculate Lat/Longs for the corners of a rectangle? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 01-29-2005 05:18 AM |
| Finding Longs and Lats on mouse Move | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-22-2004 04:12 AM |