Best way to validate addresses?

Nov 21, 2011 at 10:57 AM

Hi Velio,

Could you please let me know the best way to validate addresses? I am currently using your GeoCoding example at - http://artembg.com/Tags/Geocoding

Unfortunately this returns a coordinate for addresses that don't exist cause it strips away part of the address until it is valid. For example if i enter "fake address, Durban, South Africa", it will give me the coordinates of Durban, South Africa. This makes it very difficult to tell which addresses are valid as i have over 1000 addresses to validate. I noticed the Status property of the response object, which always returns "OK" if it finds any coordinates, and "ZERO_RESULTS" if it can't find anything at all. But this doesn't help the situation.

I've tried implementing the code you wrote in the 3rd post at - http://googlemap.codeplex.com/discussions/55007. This code is for a previous version of your google map control though, and i cannot get it to work with v6

Any input appreciated

Thanx, Chris

Nov 23, 2011 at 11:19 AM

Even if the GeoCoder works, that doesnt mean the marker will appear :(

    DataSet ds = GetDirectoryAddresses();
    string originalAddress = "";
    int count = 0;
    Marker[] marks = new Marker[ds.Tables[0].Rows.Count];
    foreach (DataRow row in ds.Tables[0].Rows)
    {
        marks[count] = new Marker();
        originalAddress = row["StreetNo"].ToString() + row["StreetName"].ToString() + row["StreetArea"].ToString() + row["AddrStateProv"].ToString() + row["PostalCode"].ToString() + row["AddrCountry"].ToString();
        marks[count].Address = originalAddress;
        marks[count].Info = originalAddress;
      count++;
    }
    googleMarker1.Markers.AddRange(marks);
Once it hits an address it can't plot forever reason, all the addresses after that are not displayed either, so if the 10th address is incorrect of 50. Only 9 will display! >.< Is there any way around this? I've looked at the marker of a working and not working one and they are identical, it gives no indication of markers that are incorrect