Get Street Adrress doesn't work on MapPoint 2004 Europe

Van
01-19-2005, 08:13 PM
Hi,

Below is my code in C++, what I try to do is looking for a group of places nearby a location, then for each place found, I display the name, street address . The same code works well for MapPoint 2004 North America, but with MapPoint 2004 Europe, it doesn't return street address, only postcode and phone number of each place found. But if I click on the map itself, it shows the street address.





double dRad = 2; // 2Km radius
oFoundResults = mpLoc.FindNearby(dRad);
Cnt = oFoundResults.GetCount();

VARIANT vIdx;
vIdx.vt = VT_I4;
vIdx.lVal = 1; // this index would be in a loop upto Cnt

oLoc = (Location) oFoundResults.GetItem(&vI);


CString Name = oLoc.GetName();
oSA = (StreetAddress) oLoc.GetStreetAddress();

CString strAddress = oSA.GetStreet(); // this works in North America, but doesn't work in Europe

CString strDetails = oSA.GetValue(); // get street address and phone number
if (strDetails.GetLength() == 0)
strDetails = "No Address";

Wilfried
01-20-2005, 04:21 AM
Hi,

I think FindNearby does not return street addresses, only points of interest. ObjectsFromPoint does, but it will give no radius. That's to do yourself.

Van
01-20-2005, 01:29 PM
Hi,

The strange thing is that same code works fine for locations in America (MapPoint 2004 N. America).
It also works fine for locations in UK (MapPoint 2004 Europe), but not Spain, France and Germany.

For the country that it works, the GetStreet() method or GetValue()returns full street name some even has phone number.

Wilfried
01-20-2005, 02:14 PM
Hi,

Maybe this is because of the way zip codes are interpreted ? For example I have learned that a postal code point to an address in US. Same in UK. I think in the netherlands also. But in most countries it is only reffering to a villeage or region, like in Belgium where I live.

 
Web mp2kmag.com
mapforums.com