View Single Post

  #2 (permalink)  
Old 01-07-2007
Wilfried Wilfried is offline
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: Riute between Postcodes using VB.net

Hi,

C# but you can easy translate it into vb.net. this is from the top of my head so there may be errors in it, but should get you started:

Code:
FindResults results = MP.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country);
if (results.ResultsQuality <= GeoFindResultsQuality.geoAmbiguousResults)
    foreach (object o in results)
        Location loc = o as Location;
            if (loc != null) {
                wp = route.Waypoints.Add(loc, nameFirstPoint);
                wp.SegmentPreferences = GeoSegmentPreferences.geoSegmentPreferred;
                break;
Then do so for the other point. At last you call route.Calculate()
Reply With Quote