I think I've seen some other posts about this subject, but I will also give this a try:
I try to obtain the ZIP codes for a given set of Locations. I use ObjectsFromPoint to get a list of streets and then try to get the postalCode for one of those streets. This works for locations that are on streets in countries such as France, Germany and Spain. It doesn't work for the Netherlands: the value for streetAddress.postalCode there is always an empty string.
My questions are:
a) Is the way I try to obtain the postalCode the best one and do any alternatives exist?
b) Does anyone know the reason why the Netherlands are different from other European countries? Is this a bug, or does Microsoft just not provide this functionality for this country?
Thanks for any help you can give me with this,
I have provided a sample of Delphi code:
function getPostalData(latitude: Extended; longitude: Extended): String;
myLoc:=myMap.GetLocation(latitude, longitude, 1);
StreetResults:= MyMap.ObjectsFromPoint(MyMap.LocationToX(myLoc), MyMap.LocationToY(myLoc));
//we loop through the resultset and look at all streets
for i:=1 to size do begin
if(temp.queryInterface(Location, myLoc)=0) then //its a location Object
if (address<>nil) then begin
result:=result+ '_'+ address.postalCode
result:=result+'_length was 0';