FindOptions.Range Property

FindOptions.Range Property

The range (FindRange object) of the full result set to return. The range identifies the first result that you want returned and the number of results to return.


Public Range As FindRange

[C#]

public FindRange Range;

Remarks

  • The maximum number of results returned is 500, except for the FindServiceSoap.FindAddress method, which returns a maximum of 100 results; the default number of results returned is 25.

  • The FindRange.StartIndex property is the zero-based array index of the first desired result. The valid range is 0 through 499. The FindRange.Count property is the number of results to return. The valid range is 1 through 500. The sum of these two properties cannot be more than 500; otherwise, a SOAP fault is returned.

    Note Assigning a range or start index that is greater than 100 with the FindServiceSoap.FindAddress method does not cause errors in your applications; however, this method does not return valid addresses when such a range or start index is assigned.

Example

[Visual Basic]

'Get a set of 30 find results
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"
findSpec.Options = New FindOptions()
findSpec.Options.Range = New FindRange()
findSpec.Options.Range.StartIndex = 0
findSpec.Options.Range.Count = 30

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#]

//Get a set of 30 find results
FindSpecification findSpec  = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";
findSpec.Options = new FindOptions();
findSpec.Options.Range = new FindRange();
findSpec.Options.Range.StartIndex = 0;
findSpec.Options.Range.Count = 30;

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

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


See Also

  FindOptions Class   |   FindRange Class