Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Riute between Postcodes using VB.net

This is a discussion on Riute between Postcodes using VB.net within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi all Can anyone point me towards some example code to enable a route to be generated between two postcodes ...

  1. #1
    Enigma is offline Junior Member White Belt
    Join Date
    Aug 2006
    Posts
    9

    Riute between Postcodes using VB.net

    Hi all

    Can anyone point me towards some example code to enable a route to be generated between two postcodes please using VB.net, Mappoint 2006

    Many thanks Pete

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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()

  3. #3
    Enigma is offline Junior Member White Belt
    Join Date
    Aug 2006
    Posts
    9

    Re: Route between Postcodes using VB.net

    Hi!

    Thanks Wilfried, I`ll give this a try and let you know.

    Many thanks Pete

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Attach UK postcodes to my dataset
    By ajoyce in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 12-13-2005, 06:07 AM
  2. I wanna show postcodes on map.
    By hasanozel in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-08-2005, 09:24 AM
  3. Updating UK Postcodes
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-28-2003, 01:39 PM
  4. Postcodes mapping
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-06-2002, 10:20 AM
  5. Several Postcodes in England have now been changed....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-13-2002, 08:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25