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

Reverse Geocoding

This is a discussion on Reverse Geocoding within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi i am trying to get the street address, or at least the city or region from a lat/long coord. ...

  1. #1
    tea_boy is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    9

    Reverse Geocoding

    Hi i am trying to get the street address, or at least the city or region from a lat/long coord. I have implemented a simple algorithm that uses the
    findNearby method to find the closest point of interest, which i can then get the address of. However when i call findnearby the screen jumps to the to the location and displays a circle representing the radius of the area im looking in.

    I have managed to stop the jump by using the GoBack() method directly after the findnearby call, however the circle is still displayed. Does anyone know of a way to hide this circle?

    A second question is that i saw a similar method to the one i have implemented that used the ObjectsFromPoint method, which i assume returns an object at a given point?? if anyone could clear this up for me i
    would appreciate it

    thanks tea_boy

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

    Re: Reverse Geocoding

    Hi,

    Code:
    Location loc = MP.ActiveMap.GetLocation(lat, lon, alt);
    loc.GoTo();
    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) {
           Console.WriteLine("value   " + streetLoc.StreetAddress.Value);
           Console.WriteLine("city    " + streetLoc.StreetAddress.City);
           Console.WriteLine("country " + streetLoc.StreetAddress.Country);
       }
    }
    You can play with altitude a bit to have your results. 1 (1 km or mile depending on your settins) will normally give statisfaction results.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Reverse Geocoding
    By Anonymous in forum News and Announcements
    Replies: 30
    Last Post: 07-26-2006, 12:21 PM
  2. Reverse geocoding with c#
    By ayazaliuk in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 06-16-2005, 07:52 AM
  3. reverse geocoding
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-09-2004, 07:27 AM
  4. Reverse Geocoding
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-26-2004, 01:30 PM
  5. Reverse geocoding
    By Anonymous in forum Products: Pushpin Tool, Single State Mapper
    Replies: 0
    Last Post: 01-26-2004, 12:23 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