locked
VEWS return an unrelated expect results RRS feed

  • Question

  • My 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)
    • Moved by nobugz Saturday, June 6, 2009 1:44 AM Unable to move thread
    • Moved by nobugz Saturday, June 6, 2009 2:11 AM not a bcl q, I think (From:.NET Base Class Library)
    Friday, June 5, 2009 6:04 PM

Answers