Answered by:
Avoid Toll Routes not working in MapPoint 2013

Question
-
Trying to avoid toll routes is not working at all, here is my code, it's in C#.
I set the preferred roads both before and after routing, and stil nothing.
object item = 1; map.ActiveRoute.Clear(); map.ActiveRoute.Waypoints.Add(map.FindResults(address).get_Item( ref item), "End"); map.ActiveRoute.DriverProfile.set_PreferredRoads( GeoRoadType.geoRoadToll, 0.0); map.ActiveRoute.DriverProfile.set_PreferredRoads( GeoRoadType.geoRoadFerry, 0.0); SetForegroundWindow(maphandle); System.Threading.Thread.Sleep(250); SendKeys.SendWait("{F3}"); map.ActiveRoute.DriverProfile.set_PreferredRoads( GeoRoadType.geoRoadToll, 0.0); map.ActiveRoute.DriverProfile.set_PreferredRoads( GeoRoadType.geoRoadFerry, 0.0);
Friday, July 13, 2012 3:49 PM
Answers
-
Are you setting 'GeoSegmentPreferences' to be geoSegmentPreferred? And also see to that you are not clearing the route after you set the preferences.
Check the, SegmentPreferences property documentation at http://msdn.microsoft.com/en-us/library/gg650087.aspx
- Proposed as answer by Gladwin Johnson Saturday, July 14, 2012 9:59 PM
- Marked as answer by Ricky_Brundritt Monday, July 16, 2012 11:10 AM
Saturday, July 14, 2012 9:58 PM -
These forums are for the Bing Maps development API's only and not the MapPoint CD/DVD product. Try http://www.mapforums.com/forum.php or http://www.mp2kmag.com/
http://rbrundritt.wordpress.com
- Marked as answer by Ricky_Brundritt Friday, July 13, 2012 4:04 PM
Friday, July 13, 2012 4:04 PM
All replies
-
These forums are for the Bing Maps development API's only and not the MapPoint CD/DVD product. Try http://www.mapforums.com/forum.php or http://www.mp2kmag.com/
http://rbrundritt.wordpress.com
- Marked as answer by Ricky_Brundritt Friday, July 13, 2012 4:04 PM
Friday, July 13, 2012 4:04 PM -
I've tried both, no luck.
I was linked to this site from here: http://msdn.microsoft.com/en-us/library/bb507682
MapPoint 2013 SDK on MSDN, yet it says absolutely nothing about the SDK itself.
There is almost no documentation on it, very disappointing product.
Friday, July 13, 2012 4:58 PM -
That documentation doesn't look like it describes an SDK at all, does it? Just looks like regular MapPoint application help. Whereabouts exactly was the link that sent you here - I'll report it to get corrected.
twitter: @alastaira blog: http://alastaira.wordpress.com/
Friday, July 13, 2012 8:39 PM -
That's the correct link, Check the 'Programming Section' and you find all the needed information on the MAPPOINT SDK.
Or go here: http://msdn.microsoft.com/en-us/library/gg674771.aspx
Saturday, July 14, 2012 9:56 PM -
Are you setting 'GeoSegmentPreferences' to be geoSegmentPreferred? And also see to that you are not clearing the route after you set the preferences.
Check the, SegmentPreferences property documentation at http://msdn.microsoft.com/en-us/library/gg650087.aspx
- Proposed as answer by Gladwin Johnson Saturday, July 14, 2012 9:59 PM
- Marked as answer by Ricky_Brundritt Monday, July 16, 2012 11:10 AM
Saturday, July 14, 2012 9:58 PM