Share via


FindNearbySpecification.DataSourceName Property

FindNearbySpecification.DataSourceName Property

A string representing the name of the data source (DataSource.Name property) in which to search for entities.


Public DataSourceName As system.String


[C#]

public System.String DataSourceName;

Remarks

  • The DataSourceName property is used with the specification parameter of the FindServiceSoap.FindNearby method.

  • The DataSourceName property is required, and must represent a valid data source for use with the FindServiceSoap.FindNearby method.

  • The FindServiceSoap.FindNearby method is valid only with data sources that have a CanFindNearby capability (DataSourceCapability enumeration). This includes several MapPoint Web Service point-of-interest data sources, as well as your own data source if you have uploaded location data to it using the MapPoint Web Service Customer Services site (https://mappoint-css.live.com/CSCV3/).

  • For more information about MapPoint Web Service data sources, see MapPoint Web Service Data Sources and Capabilities.

  • To retrieve a list of data sources and their capabilities, use the CommonServiceSoap.GetDataSourceInfo method.

  • For information about using your own data with MapPoint Web Service, see the Help topic Using the MapPoint Web Service Customer Services site in the MapPoint Web Service Customer Services site (https://mappoint-css.live.com/CSCV3/).

  • For information about becoming a customer, visit the MapPoint Web Service Web site.

Example

[Visual Basic]

'Output a property value (the phone number) for each 
'MapPoint.FourthCoffeeSample store nearby
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"

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 a property value (the phone number) for each 
//MapPoint.FourthCoffeeSample store nearby
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";

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   |   DataSource.Name Property   |   FindServiceSoap.FindNearby Method   |   FindAddressSpecification.InputAddress Property   |   MapPoint Web Service Data Sources and Capabilities