Two results for one address :-(

alex_kuechler
01-07-2007, 04:40 AM
Hey all,

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

Eric Frost
01-07-2007, 08:54 AM
Can you always just use the first one?

Eric

Wilfried
01-07-2007, 11:11 AM
Hi,

if geoFirstResultGood then just use the first one as you do in your example.

alex_kuechler
02-16-2007, 07:07 AM
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 (http://maps.google.com) 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 :???: Google returns only one correct result ...

Wilfried
02-16-2007, 01:37 PM
Hi Alex,

I'm not sure I understeand what you mean. I tryed the following:

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;
}

I had the FirstResultGood and only 1 result. So what is wrong ?

alex_kuechler
02-28-2007, 09:17 PM
Please try: Buchaerstr. 8c, 07745, Jena, Deutschland instead. You will get two results for this adress. I'm sure ...

Alex

Wilfried
03-01-2007, 07:13 AM
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:

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);

alex_kuechler
03-08-2007, 03:50 AM
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 (http://www.local.live.com): 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

Wilfried
03-08-2007, 04:24 AM
Hi,

Very strange. Sorry I dont have any explanation wy results are different.

 
Web mp2kmag.com
mapforums.com