View Single Post

  #3 (permalink)  
Old 03-24-2004
Anonymous Anonymous is offline
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Dim myAddress As New Address()
Dim findAddressSpec As New FindAddressSpecification()
Dim AddressResults As FindResults

findAddressSpec.InputAddress = myAddress
findAddressSpec.DataSourceName = "MapPoint.NA"

myAddress.AddressLine = Request.Form("Address")
myAddress.PrimaryCity = Request.Form("City")
myAddress.Subdivision = Request.Form("State")
myAddress.PostalCode = Request.Form("ZIP")
myAddress.CountryRegion = "US"

AddressResults = findService.FindAddress(findAddressSpec)

if (AddressResults.TopScore < 1 ) then
errorString = "BAD ADDRESS"
End if

//trying to use the
AddressResults.TopScore property to determine the score,.. but i get a 0.95 for a good address and 0.95 for a address which is failry close,.. mappoint just finds a close match (which sometimes is not what i want)

i do get a 0.5 score sometimes if i have a colorado zip of a newyork address or something that bad,. a slight mistake like zipcode is close or its the street name is mispelt slightly,.. i get a 0.95,..

the problem is i Never get a 1 for the topscore if the address is a perfect match..

let me know if u need more example/code to help me out here,..

- anu
Reply With Quote