Share via


ResultsQuality property

Returns an assessment of how well the results in the specified FindResults collection match the criteria used by the FindAddressResults, FindPlaceResults, FindResults, and ObjectsFromPoint methods of a Map object or the FindNearby method of a Directions collection, Direction object, or Location object. Returns a read-only GeoFindResultsQuality object.

GeoFindResultsQuality

Value

Description

geoAllResultsValid

0

All returned results match the method criteria. Used only for results obtained from the FindNearby and ObjectsFromPoint methods, where all results match the criteria.

geoAmbiguousResults

2

At least the first two results are good matches, but it is not clear which one was intended.

geoFirstResultGood

1

The first result is a good match to the method criteria.

geoNoGoodResult

3

None of the results is a good match to the method criteria, but the results are the best available.

geoNoResults

4

No results are returned.

Applies to

Collections: FindResults

Syntax

object.ResultsQuality

Parameters

Part

Description

object

Required. An expression that returns a FindResults collection.

Remarks

  • Even if the ResultsQuality property returns geoFirstResultGood, you may want to check the Type, StreetAddress, or PlaceCategory property of a Location object to ensure that it is a good match.

Example

Sub AddPushpinToGoodFindMatch()

Dim objApp As New MapPoint.Application
Dim objFR As MapPoint.FindResults

'Set up the application
objApp.Visible = True
objApp.UserControl = True

'Get a FindResults collection
Set objFR = objApp.ActiveMap.FindResults("Seattle")

'If the first result is a good match, then use it
If objFR.ResultsQuality = geoFirstResultGood Then
    objApp.ActiveMap.AddPushpin objFR.Item(1)
Else
    MsgBox "The first result was not a good match."
End If

End Sub

Note   This code example contains data that is specific for use in MapPoint North America; it is for illustration purposes only.