Share via


FindResultMask Enumeration

FindResultMask Enumeration

The location elements that are optional for inclusion in a FindResult.FoundLocation property returned from the Find, FindAddress, FindByID, FindByProperty, FindNearby, or FindNearRoute methods of the FindServiceSoap class. One, some, or all of the four flags can be set. If no flags are set, values for all members except MatchDetailsFlag are returned.

Public Enum FindResultMask Inherits System.Enum

[C#]
public enum FindResultMask : System.Enum

Members

The following table lists the values for the FindResultMask enumeration.

Name Description
LatLongFlag

Returns the latitude and longitude coordinates (Location.LatLong property).

EntityFlag

Retruns the geographic entity (Location.Entity property).

AddressFlag

Returns the address (Location.Address property).

BestMapViewFlag

Returns the map view (Location.BestMapView property).

MatchDetailsFlag

Returns the Match Code and Matched Method values.

Remarks

  • The FindResultMask enumeration is helpful for reducing network bandwidth by limiting the size of the result set.

  • The AddressFlag member is valid only with the FindAddress, FindByID, FindByProperty, FindNearby and FindNearRoute methods of the FindServiceSoap class.

  • The BestMapViewFlag member is valid only with the Find and FindAddress methods of the FindServiceSoap class.

  • The name of the data source (Location.DataSourceName property) is always returned in the FindResult.FoundLocation property.

  • To define which location elements to return from the FindServiceSoap.GetLocationInfo method, use the properties of the GetInfoOptions class.

  • MatchDetailsFlag is the only member that defaults to false. You must specify this member if you want the detailed Match Code and Matched Method information returned. For more information about using Match Code and Matched Method values, see Using Match Code and Matched Method.

Example

[Visual Basic]

'Only return 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#]

//Only return 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

  FindResult.FoundLocation Property   |   FindServiceSoap Class   |   Location Class   |   GetInfoOptions Class