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 5 of 5

Extracting street names from route Instruction

This is a discussion on Extracting street names from route Instruction within the MapPoint Desktop Discussion forums, part of the Map Forums category; Has anyone done or does anyone know how to programmatically extract the street names from a Directions(i).Instruction property? I’d like ...

  1. #1
    Curt is offline Junior Member White Belt
    Join Date
    Aug 2005
    Posts
    1

    Extracting street names from route Instruction

    Has anyone done or does anyone know how to programmatically extract the street names from a Directions(i).Instruction property? I’d like to know just the name of the street. For example:

    For “Turn RIGHT (East) onto Paradise Lake Rd, then immediately turn RIGHT (South) onto Bostian Rd”, I’d like to get: “Paradise Lake Rd” and “Bostian Rd”.

    For “Turn RIGHT (North-East) onto SR-202 [NE 175th St]”, I’d like to get “NE 175th St”

    For “Turn LEFT (North) onto SR-202 [131st Ave NE]”, I’d like to get “131st Ave NE”.

    For “Take Ramp (RIGHT) onto SR-522” I’d like to get “SR-522”.

    For “Road name changes to Crystal Lake Rd” I’d like to get “Crystal Lake Rd”.

    In other words, has anyone figured out the possible formats for this string so they can extract just the street names?

    Curt

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi
    Code:
                Directions dir = route.Directions;
                for &#40;int i = 0; i < dir.Count; i++&#41; &#123;
                    object o = i;
                    map.Location = dir.get_Item&#40;ref o&#41;.Waypoint.Location;
    And there you go

  3. #3
    smengl is offline Junior Member Yellow Belt
    Join Date
    Jun 2010
    Posts
    26

    Re: Extracting street names from route Instruction

    I don't think your method does the job. Waypoints are specified by us when we want to calculate a route. So doing like u did will just give the starting point of the entire route.

    Anyone knows what the template mappoint uses to output the instructions so I can extract the street names?

    Thanks

  4. #4
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: Extracting street names from route Instruction

    It just requires some parsing - not easy, but I've done it.
    Michael R Mattys
    Business Process Developers
    www.mattysconsulting.com

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

    Re: Extracting street names from route Instruction

    Hi,

    Yes of course it works. You have all properties like Instruction, Startime, Type, ... But as Mike say it requires some parsing.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Route Direction Location Instruction
    By disweij in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 10-17-2005, 02:45 PM
  2. Street Names etc...
    By Milo in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-27-2005, 03:16 PM
  3. street names
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-04-2003, 07:49 AM
  4. Extracting the route sequence
    By ivtch in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-11-2003, 04:29 PM
  5. How can I get all the street names in a city?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 11-04-2002, 08:06 PM

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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96