SearchOperatorFlag Enumeration
The operators available for use with the WhereClause.SearchOperator property, which identifies whether to return results that match all the properties (And) or any one of the properties (Or) in the WhereClause.SearchProperties property passed in the specification parameter of the points of interest find methods (FindServiceSoap.FindByID, FindServiceSoap.FindByProperty, FindServiceSoap.FindNearby and FindServiceSoap.FindNearRoute).
Public Enum SearchOperatorFlag
Member of [Namespace]
[C#]
public enum SearchOperatorFlag : System.Enum
Member of [Namespace]
Members
| Name | Description |
|---|---|
| And | And operator |
| Or | Or operator |
Example
[Visual Basic]
'This example assumes that the service instance
''findService' has already been created and that
'the MapPoint Web Service namespace has been imported
'Search for drive-thrus that are currently operating
Dim mySearchProperties(1) As EntityPropertyValue
mySearchProperties(0) = New EntityPropertyValue()
mySearchProperties(0).Name = "StoreOpen"
mySearchProperties(0).Value = "Y"
mySearchProperties(1) = New EntityPropertyValue()
mySearchProperties(1).Name = "StoreType"
mySearchProperties(1).Value = "Drive-Thru"
Dim findNearbySpec As New FindNearbySpecification()
findNearbySpec.DataSourceName = "MapPoint.FourthCoffeeSample"
findNearbySpec.Distance = 1
findNearbySpec.LatLong = New LatLong()
findNearbySpec.LatLong.Latitude = 47.6
findNearbySpec.LatLong.Longitude = -122.33
findNearbySpec.Filter = New FindFilter()
findNearbySpec.Filter.EntityTypeName = "FourthCoffeeShops"
findNearbySpec.Filter.WhereClause = New WhereClause()
findNearbySpec.Filter.WhereClause.SearchProperties = mySearchProperties
findNearbySpec.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And
Dim foundResults As FindResults
foundResults = findService.FindNearby(findNearbySpec)
[C#]
//This example assumes that the service instance
//'findService' has already been created and that
//the MapPoint Web Service namespace has been imported
//Search for drive-thrus that are currently operating
EntityPropertyValue[] mySearchProperties = new EntityPropertyValue[1];
mySearchProperties[0] = new EntityPropertyValue();
mySearchProperties[0].Name = "StoreOpen";
mySearchProperties[0].Value = "Y";
mySearchProperties[1] = new EntityPropertyValue();
mySearchProperties[1].Name = "StoreType";
mySearchProperties[1].Value = "Drive-Thru";
FindNearbySpecification findNearbySpec = new FindNearbySpecification();
findNearbySpec.DataSourceName = "MapPoint.FourthCoffeeSample";
findNearbySpec.Distance = 1;
findNearbySpec.LatLong = new LatLong();
findNearbySpec.LatLong.Latitude = 47.6;
findNearbySpec.LatLong.Longitude = -122.33;
findNearbySpec.Filter = new FindFilter();
findNearbySpec.Filter.EntityTypeName = "FourthCoffeeShops";
findNearbySpec.Filter.WhereClause = new WhereClause();
findNearbySpec.Filter.WhereClause.SearchProperties = mySearchProperties;
findNearbySpec.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And;
FindResults foundResults;
foundResults = findService.FindNearby(findNearbySpec);
See Also
WhereClause.SearchOperator Property | FindServiceSoap.FindNearby Method