FindNearbySpecification.Options Property

FindNearbySpecification.Options Property

The search options (FindOptions object), which may include the range of results and a flag to identify which objects are desired in the returned results.


Public Options As FindOptions


[C#]

public FindOptions Options;

Remarks

Example

[Visual Basic]

'Output the phone numbers of the five nearest coffee shops
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.Options = New FindOptions()
findNearbySpec.Options.Range = New FindRange()
findNearbySpec.Options.Range.StartIndex = 0
findNearbySpec.Options.Range.Count = 5

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

Console.WriteLine("Fourth Coffee Shop Store List")
Dim fr As FindResult
For Each fr In foundResults.Results
 Console.WriteLine(fr.FoundLocation.Entity.Name + ": " _
  + fr.FoundLocation.Entity.Properties(6).Value.ToString())
Next



[C#]

//Output the phone numbers of the five nearest coffee shops
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.Options = new FindOptions();
findNearbySpec.Options.Range = new FindRange();
findNearbySpec.Options.Range.StartIndex = 0;
findNearbySpec.Options.Range.Count = 5;

FindResults foundResults;
foundResults = findService.FindNearby(findNearbySpec);

Console.WriteLine("Fourth Coffee Shop Store List");
foreach(FindResult fr in foundResults.Results)
{
 Console.WriteLine(fr.FoundLocation.Entity.Name + ": "
  + fr.FoundLocation.Entity.Properties[6].Value.ToString());

}


See Also

  FindNearbySpecification Class   |   FindOptions Class   |   FindServiceSoap.FindNearby Method   |   FindOptions.ThresholdScore Property   |   FindNearbySpecification.Distance Property