FindServiceSoap.Find Method

FindServiceSoap.Find Method

Finds geographic locations in a specified data source based on a request that may include the place and entity type names to find. Returns an array of results ordered by score, the top score, the number of results found, and the index into the array of results, as a FindResults object. Maximum returned value is 500. Default number of returned results is 25.


Public Function Find (ByVal specification As FindSpecification) As FindResults


[C#]

public FindResults Find (FindSpecification specification);

Parameters

  • specification
    The specification of the request to find a place (FindSpecification object), including the place and entity type to find, the results range to return, the threshold score for results returned, the search context, a flag to identify which objects you want in the returned results, and the data source to search in.

Remarks

  • The Find method is valid with the MapPoint.AP, MapPoint.BR, MapPoint.EU, MapPoint.NA, MapPoint.World, and MapPoint.WorldRoutable data sources. For more information about MapPoint Web Service data sources, see MapPoint Web Service Data Sources and Capabilities.

Example

[Visual Basic]

'Output the returned find results
Dim findService As New FindServiceSoap()
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"

Dim foundResults As FindResults
foundResults = findService.Find(findSpec)

Dim fr As FindResult
For Each fr In foundResults.Results
 Console.WriteLine(fr.FoundLocation.Entity.DisplayName)
Next



[C#]

//Output the returned find results
FindServiceSoap findService = new FindServiceSoap();
FindSpecification findSpec  = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";

FindResults foundResults;
foundResults = findService.Find(findSpec);

foreach(FindResult fr in foundResults.Results)
{
 Console.WriteLine(fr.FoundLocation.Entity.DisplayName);
}


See Also

  FindServiceSoap Class   |   FindResults Class   |   EntityType.Definition Property   |   CommonServiceSoap.GetEntityTypes Method   |   FindResults.NumberFound Property