MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




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 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 01-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 01-03-2007
Member
Green Belt
 
Join Date: Nov 2006
Posts: 87
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 01-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 01-04-2007
Member
Green Belt
 
Join Date: Nov 2006
Posts: 87
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 01-04-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
address, complete, latitud, longitudes, retrieve


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to retrieve nearest city from longitudes and latitud fsarraj MapPoint 2006/2009 Discussion 3 03-08-2006 01:22 PM
Is it possible to calculate latitud/longitud through address Learner MapPoint 2006/2009 Discussion 1 03-08-2006 01:15 PM
Complete adress, when using ShowFindDialog? Jarun MapPoint 2006/2009 Discussion 3 04-11-2005 02:31 PM
MapPoint can't import near-zero longitudes? random MapPoint 2006/2009 Discussion 6 08-25-2004 10:03 AM
Complete data connectivity Anonymous MapPoint 2006/2009 Discussion 0 07-01-2003 03:57 AM


All times are GMT -5. The time now is 04:03 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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