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

Need to get a return address from MapPoint

This is a discussion on Need to get a return address from MapPoint within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I use the folowing code to get a MapPoibt.Location from MapPoint, nd it works fine. But I need to ...

  1. #1
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    Need to get a return address from MapPoint

    Hi,

    I use the folowing code to get a MapPoibt.Location from MapPoint, nd it works fine. But I need to have a loko at the actual address it is returning.

    I have found a problem in MapPoint 2004, which is my latest version I have. When I attempt to get "256 Pleasant St, Arlington, MA", for example, I get the same location as if I asked for "1 Pleasant St, Arlington, MA". So I decided to have a look at what MapPoint is returning to me. The MapPoint program with the WIndws GUI returns "Pleasant St, Arlington, MA". So I want to be able to examine the address of what's coming back to me.

    I knw I ned to iterate through results.GetEnumerator() but I'm not sure how.

    Thanks,
    Bob

    MapPoint.Route mpRoute = mpMap.ActiveRoute;
    MapPoint.FindResults results = mpMap.FindAddressResults( street, city, "", state, "", 244 );

    //SetSpeedProfile( handles, mpRoute );
    handles.MapPointFindResults = results;
    if (results.Count >= 1 && results.ResultsQuality == resultsQuality )
    {
    mpRoute = mpMap.ActiveRoute;
    IEnumerator item = results.GetEnumerator();
    item.Reset();
    item.MoveNext();
    return (MapPoint.Location)item.Current;
    }

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

    I knw I ned to iterate through results.GetEnumerator() but I'm not sure how
    I'm not sure I understeand your question but: use foreach()

  3. #3
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    yes, but

    Wilfried,

    Thanks. Stupid Me! I was using this kind of loop:

    foreach (MapPoint.Location in results)
    {
    }

    I forgot to unclude the actual variable.

    C:\Texselogic\Projects\DMS\Trip.cs(293): Type and identifier are both required in a foreach statement

    Thanks.

  4. #4
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    Multiple addresses for a given address

    Hi,

    I have a major problem I hope I can find a solution for. I'm going live in a pizza shop next week at the following address:

    1000 US 80
    Haughton, LA

    But when I enter the address, it shows me two versions of the address, with 7 miles in between! Please check it out. I never saw this before.

    I'm using MapPoint 2004. Is this fixed in a later version? If so, I wonder how I could get an update. I have the MSDN subscription for 2004, but I have no funds to update it. That's what this test is all about.

    Any suggestions?

    Thanks,
    Bob

  5. #5
    BobFromBoston is offline Senior Member Green Belt
    Join Date
    Jul 2005
    Posts
    128

    got it

    Actually, in that case, MapPoint returned the reult type as ambiguous, so in the case I just use a web service as a backup.

    No reply needed.

    Thanks,
    Bob

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Return Pushpin Symbol
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-27-2005, 03:12 PM
  2. Return surrounding Zip Codes
    By johnweidauer in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 02-11-2004, 05:58 PM
  3. Can Mappoint 3.0 SDK return Latitude Longitude coordinates?
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-27-2004, 06:56 PM
  4. newbie wants help in getting mappoint to return coordinates
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-02-2003, 03:36 PM
  5. When I enter just a zipcode in MapPoint, it return....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-30-2002, 09:43 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