FindPlaceResults method

Returns a collection of locations and Pushpins (FindResults collection) that are possible find matches based on the input string; similar to using the Place tab on the Find dialog box.

Applies to

Objects:  Map

Syntax

object.FindPlaceResults(Name)

Parameters

Part Description
object Required. An expression that returns a Map object.
Name Required String. The name of the place to find.

Remarks

To return an assessment of how well the results produced by the FindPlaceResults method match the Name parameter, use the ResultsQuality property of the FindResults collection, or check the Type, StreetAddress, or PlaceCategory property of a Location object.

If the input is a place name that MapPoint might interpret as an address (for example "Club Easy Street"), the results will be ambiguous. Therefore, if you are not sure whether the input is a place name or an address, it is a good idea to use multiple methods—the FindResults, FindAddressResults, and FindPlaceResults methods—and then compare the results.

To open the Find dialog box for user input, use the ShowFindDialog method on the Map object.

Example

  
    Sub FindPlaces()
    Dim oApp As MapPoint.Application
    Dim oMap As MapPoint.Map

    Set oApp = CreateObject("MapPoint.Application")
    Set oMap = oApp.ActiveMap
    oApp.UserControl = True
    oApp.Visible = True

    oMap.AddPushpin oMap.FindPlaceResults("Washington, D.C.")(1)
    oMap.AddPushpin oMap.FindPlaceResults("Mount Rushmore")(1)
End Sub
  

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