FindAddressSpecification.DataSourceName Property
FindAddressSpecification.DataSourceName Property
A string representing the name of the data source (DataSource.Name property) in which to search for the address.
Public DataSourceName As System.String
[C#]
public System.String DataSourceName;
Remarks
The DataSourceName property is used with the specification parameter of the FindServiceSoap.FindAddress method.
The DataSourceName property is required, and must represent a valid data source for the address identified in the InputAddress property.
The FindServiceSoap.FindAddress method is valid for only certain countries or regions within the MapPoint.AP, MapPoint.BR, MapPoint.EU and MapPoint.NA data sources. For more information, see MapPoint.AP Data Source, MapPoint.BR Data Source, MapPoint.EU Data Source and MapPoint.NA Data Source.
Example
[Visual Basic]
'Set up the Address object and the specification object
Dim myAddress As New Address()
myAddress.AddressLine = "1 Microsoft Way"
myAddress.PrimaryCity = "Redmond"
myAddress.Subdivision = "WA"
myAddress.PostalCode = "98052"
myAddress.CountryRegion = "US"
Dim findAddressSpec As New FindAddressSpecification()
findAddressSpec.InputAddress = myAddress
findAddressSpec.DataSourceName = "MapPoint.NA"
'Declare the return variable and find the address
Dim foundAddressResults As FindResults
foundAddressResults = findService.FindAddress(findAddressSpec)
If (foundAddressResults.NumberFound = 1) Then
Console.WriteLine(foundAddressResults.Results(0).FoundLocation.Entity.DisplayName)
Else
Console.WriteLine("Zero or multiple results found.")
End If
[C#]
//Set up the Address object and the specification object
Address myAddress = new Address();
myAddress.AddressLine = "1 Microsoft Way";
myAddress.PrimaryCity = "Redmond";
myAddress.Subdivision = "WA";
myAddress.PostalCode = "98052";
myAddress.CountryRegion = "US";
FindAddressSpecification findAddressSpec = new FindAddressSpecification();
findAddressSpec.InputAddress = myAddress;
findAddressSpec.DataSourceName = "MapPoint.NA";
//Declare the return variable and find the address
FindResults foundAddressResults;
foundAddressResults = findService.FindAddress(findAddressSpec);
if (foundAddressResults.NumberFound == 1)
{
Console.WriteLine(foundAddressResults.Results[0].FoundLocation.Entity.DisplayName);
}
else
{
Console.WriteLine("Zero or multiple results found.");
}
See Also
FindAddressSpecification Class | DataSource.Name Property | FindServiceSoap.FindAddress Method | MapPoint.EU Data Source | MapPoint.NA Data Source