VEWS return an unrelated expect results
-
05 Juni 2009 18:04My application is design to display all the results which return from SEWS combine with the results from our database in an Disambiguation box.
However, when perform a search of "Owen Sound", SEWS returns 2 different results.
1. Owen Sound, ON, Canada with lat and long are are 44.5721 and -80.9433 respectively. (expected)
2. Durham, ON, Canada with lat and long are are 44.1821 and -80.8208. (unexpected)
the Durham result causes confusion from user. My question is, how can I avoid the unexpected results from SEWS.
Below is my code:
Public Function GeocodeAddress(ByVal address As String) As VEGeocodeWS.GeocodeResponse
'Instantiate credentials for geocode request
Dim objGeocodeService As New VEGeocodeWS.GeocodeService
'Instantiate the Confidence filter
Dim objConfidenceFilters(0) As VEGeocodeWS.ConfidenceFilter
objConfidenceFilters(0) = New VEGeocodeWS.ConfidenceFilter()
objConfidenceFilters(0).MinimumConfidence = VEGeocodeWS.Confidence.High
'Instantiate Geocode options
Dim objGeocodeOptions As New VEGeocodeWS.GeocodeOptions
objGeocodeOptions.Count = 10
objGeocodeOptions.Filters = objConfidenceFilters
Dim objCredentials As New VEGeocodeWS.Credentials
objCredentials.Token = Token.GetToken()
'Instantiate geocode request
Dim objGeocodeRequest As New VEGeocodeWS.GeocodeRequest
With objGeocodeRequest
.Query = address
.Culture = CurrentThread.CurrentCulture.Name()
.Credentials = objCredentials
.Options = objGeocodeOptions
End With
Return objGeocodeService.Geocode(objGeocodeRequest)
Semua Balasan
-
02 Mei 2012 5:40Pemilik
Need more info about your code technologies and tools used.
Thanks!
Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)
- Disarankan sebagai Jawaban oleh Ed Price - MSFTMicrosoft Employee, Owner 02 Mei 2012 5:40
- Ditandai sebagai Jawaban oleh Ed Price - MSFTMicrosoft Employee, Owner 02 Mei 2012 5:40