Community of VE/MapPoint Users and Developers
This is a discussion on Two results for one address :-( within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hey all, I'm using MapPoint 2006 Europe Standard (Version 13.00.18.1200) and the following code: Set oFindResultReferee = oMap.FindAddressResults(RefereeStreet, RefereeCity, , ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Two results for one address :-( I'm using MapPoint 2006 Europe Standard (Version 13.00.18.1200) and the following code: Set oFindResultReferee = oMap.FindAddressResults(RefereeStreet, RefereeCity, , , RefereeZip, geoCountryGermany) If oFindResultReferee.ResultsQuality = geoFirstResultGood Then Set oLocReferee = oFindResultReferee.Item(1) Else RefereeAddress = RefereeCity & ", " & RefereeZip & ", " & RefereeState Set oLocReferee = oMap.FindPlaceResults(RefereeAddress)(1) End If That means I look for an specific address using street, City, Zip and CountryProperty and have to get one single result. If I'll find more than one result, I show a message (not in the code) and try to find something near the address. From a list of more than 200 addresses sometimes I'll get a resultlist from two same addresses like shown in the pic (attachment). Can anybody help me please. I have to process more than 500 addresses and I'm forced to use only correct addresses. I do not want to use something like: Set oLocReferee = oFindResultReferee.Item(2) or so, I need only correct addresss. I repet, this only occurs for 14 out of more than 500 addresses ... Thanks for your help. Alex |
| |||
| Re: Two results for one address :-(
Hi, if geoFirstResultGood then just use the first one as you do in your example.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Two results for one address :-(
But, this can't be the solution to use simply the first address. Maybe there is a real difference between the result set of addresses. Please try "Buchaerstr. 8c, Jena, 07745, Deutschland" in Google Maps and also in http://http://local.live.com/. You will see, that with Microsofts local.live will return a result of two found addresses and both are the same! That's a bug not a feature |
| |||
| Re: Two results for one address :-(
Hi Alex, I'm not sure I understeand what you mean. I tryed the following: Code: string street = "Buchaerstr";
string zip = "07745";
string city = "jena";
string othercity = "";
string region = "";
GeoCountry country = GeoCountry.geoCountryGermany;
FindResults results = MP.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country);
Console.WriteLine(results.ResultsQuality.ToString());
if (results.ResultsQuality <= GeoFindResultsQuality.geoAmbiguousResults)
foreach (object o in results) {
Location loc = o as Location;
if (loc != null) {
double Lat;
double Lon;
Pushpin PP = MP.ActiveMap.AddPushpin(loc, "");
PP.GoTo();
MPTools.CalcPos(MP.ActiveMap, loc, out Lat, out Lon);
Console.WriteLine(loc.Name + " " + Lat.ToString() + " " + Lon.ToString());
break;
}
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Two results for one address :-(
Hi, With the number in the streetname I get geoAmbiguousResults as resultsQuality. But still only 1 result and that is: Buchaerstraße 8, 07745 Jena. this is the data I tryed with this time: Code: string street = "Buchaerstr 8c"; string zip = "07745"; string city = "jena"; string othercity = ""; string region = ""; GeoCountry country = GeoCountry.geoCountryGermany; FindResults results = MP.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country);
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Two results for one address :-(
Hi, thanks for your help. I use VBA in an Excel Makro and if I watch the 'results' variable I get also an geoAmbiguousResult with 2(!) items. They have the same address, but different coordinates (please see attached file!). If you use the MapPoint application itself you'll get a box offering you two results, very close to each other, but not the same. The same will happen, when you try 'Buchaerstr. 8c, 07745, Jena, Deutschland' on Live Local Search: two results with the same address, but with different GPS coordinates. I think thats not what they want ... at least not what I expect! Alex |
| |||
| Re: Two results for one address :-(
Hi, Very strange. Sorry I dont have any explanation wy results are different.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| address, results |
| ||||
| Posted By | For | Type | Date | |
| LGPMap Uses MapPoint and AutoRoute - MapPoint Articles - MP2K Magazine | This thread | Refback | 01-16-2007 06:04 PM | |
| MapPoint User Community - MP2K Magazine | This thread | Refback | 01-13-2007 03:14 PM | |
| What's New in Streets and Trips 2006 - MapPoint Articles - MP2K Magazine | This thread | Refback | 01-08-2007 07:15 PM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 01-08-2007 12:43 AM | |
| Map Visitors - Powered by Virtual Earth | This thread | Refback | 01-07-2007 11:10 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Returning results from ShowFindDialog | mbdunkin | MapPoint 2006/2009 Discussion | 3 | 08-15-2005 10:39 PM |
| Property MatchingMethod results (VBA) | Anonymous | MapPoint 2006/2009 Discussion | 0 | 11-05-2004 11:47 AM |
| FindAddress Results in c# | starbuck | MapPoint 2006/2009 Discussion | 1 | 09-21-2004 06:00 PM |
| help - new user, no results | Anonymous | Products: Pushpin Tool, Single State Mapper | 1 | 07-29-2003 11:56 PM |
| Search results in spanish? | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-11-2003 02:08 PM |