Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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. |
| |||
| 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) {
// ...
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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? |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| address, complete, latitud, longitudes, retrieve |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |