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
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

How to retrieve complete address from longitudes and latitud

This is a discussion on How to retrieve complete address from longitudes and latitud within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I'm not sure I have understeand you correct. You need the Location object to get a Collection returned from ...

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

    Re: How to retrieve complete address from longitudes and latitud

    Hi,

    I'm not sure I have understeand you correct. You need the Location object to get a Collection returned from ObjectsFromPoint method. This Collection contains Location (and eventually other) objects where you can check the StreetAddress property.

    I deleted the other thread you started as per your request.

  2. #12
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: How to retrieve complete address from longitudes and latitud

    Well you said that the locationobject of an existing pushpin have an empty StreetAdress object. So I said, than I've to make a new location object from the locationobject of the existing pushpin object. In one line:
    I need to make a new location object of the existing pushpin object

    And than I can get a StreetAdress object from where I can parse the resultingadress right.

    StreetAdress has a Value propperty, does Value contains the complete adressinformation, like street, number, zipcode, city... in a string?
    Last edited by VC_Man; 01-04-2007 at 03:54 AM.

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

    Re: How to retrieve complete address from longitudes and latitud

    Hi,

    Yes. Sorry my English is not my mothers tongue, so here and there will always some misundersteandings

    Indeed, as in this example, suppose 'loc' is the Location object, then the next line streetsResults has a collection of objects which hold the StreetAddress (or many streetAdresses or points of intereste etc). In the foreach you walk trough them:

    Code:
    FindResults streetResults = map.ObjectsFromPoint(map.LocationToX(loc), map.LocationToY(loc));
    
    foreach (object o in streetResults) {
        Location streetLoc = o as Location;
        if(streetLoc != null && streetLoc.StreetAddress != null) {
            // ...
    And indeed the Value property contains the complete address with street, number, city, zip.

  4. #14
    VC_Man is offline Member Green Belt
    Join Date
    Nov 2006
    Posts
    93

    Re: How to retrieve complete address from longitudes and latitud

    Thanx for your reply Wilfried,

    So with Value I get just one adress, and if the vehicle I follow drives only on roads and highways, than I don't need to do the foreach to get the closest adress, right?

    But suppose the vehicle is on a crossroad, which adress will Value have? How does Value do that?

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

    Re: How to retrieve complete address from longitudes and latitud

    Hi,

    You have to check the ResultsQuality property. If it is FirstResultGood, or AllResultsGood then you dont need the foreach.

    However a road can have many names. For example the real road name, but precides that it can have a number. This is depending the country of course and accourding to your needs.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to retrieve nearest city from longitudes and latitud
    By fsarraj in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 05-11-2011, 03:04 AM
  2. Is it possible to calculate latitud/longitud through address
    By Learner in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-08-2006, 01:15 PM
  3. Complete adress, when using ShowFindDialog?
    By Jarun in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-11-2005, 02:31 PM
  4. MapPoint can't import near-zero longitudes?
    By random in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 08-25-2004, 10:03 AM
  5. Complete data connectivity
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-01-2003, 03:57 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 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