MSDN Library

FindFilter.WhereClause Property

MapPoint Web Service is deprecated and will be retired November 18, 2011. Please go to http://www.microsoft.com/maps/mappoint.aspx for information about upgrading to Bing Maps.

A value filter to apply to the results (WhereClause object) returned from the point-of-interest find and polygon methods. The WhereClause defines the entity property/value pairs that the results returned from the point-of-interest find and polygon methods must match.

[Visual Basic]

	Public WhereClause As WhereClause
[C#] public WhereClause WhereClause;

Remarks

  • If the WhereClause and Expression properties are both null, all entities are returned for the FindByID, FindNearby, FindNearRoute, and FindPolygon methods, regardless of their property values. However, an exception is thrown for the FindServiceSoap.FindByProperty method if both the properties are null.

  • The WhereClause property and the Expression property are mutually exclusive; when both properties are assigned values, an exception is thrown.

Example


[Visual Basic]

'Search for stores that are open
Dim mySearchProperties(0) As EntityPropertyValue
mySearchProperties(0) = New EntityPropertyValue()
mySearchProperties(0).Name = "StoreOpen"
mySearchProperties(0).Value = "Y";

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

Dim foundResults As FindResults
foundResults = findService.FindNearby(findNearbySpec)

[C#] //Search for stores that are open EntityPropertyValue[] mySearchProperties = new EntityPropertyValue[1]; mySearchProperties[0] = new EntityPropertyValue(); mySearchProperties[0].Name = "StoreOpen"; mySearchProperties[0].Value = "Y"; 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; FindResults foundResults; foundResults = findService.FindNearby(findNearbySpec);

See Also

  FindFilter Class   |     |   FilterExpression Class   |   FindServiceSoap Class  

Show:
© 2016 Microsoft