Share via


FindOptions.ResultMask Property

FindOptions.ResultMask Property

The mask, as a FindResultMask enumeration, that identifies which of the properties of the found location should be returned: address, map view, latitude and longitude coordinates, entity information, and Match Details information. Optional.


Public ResultMask As FindResultMask

[C#]

public FindResultMask ResultMask;

Remarks

  • If not set, the default behavior returns all the properties of the Location object.

  • A ResultMask property value of BestMapView (FindResultMask enumeration) is ignored when passed in the Options property of the specification object for the FindByID, FindByProperty, FindNearby, and FindNearRoute methods of the FindServiceSoap class.

  • Using the ResultMask property allows you to limit the results to include only those properties that you need, and thereby manage the size of the returned XML.

Example

[Visual Basic]

'Return only LatLong and Entity objects information
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"
findSpec.Options = New FindOptions()
findSpec.Options.ResultMask = FindResultMask.LatLongFlag Or FindResultMask.EntityFlag

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

//Return only LatLong and Entity objects information
FindSpecification findSpec  = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";
findSpec.Options = new FindOptions();
findSpec.Options.ResultMask = FindResultMask.LatLongFlag | FindResultMask.EntityFlag;

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

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


See Also

  FindOptions Class   |   FindResultMask Enumeration   |   Location Class