Address.AddressLine Property
Address.AddressLine Property
The street line of an address. The AddressLine property is the most precise, official line for an address relative to the postal agency servicing the area specified by the PrimaryCity, SecondaryCity, or PostalCode properties. Typical use of this element would be to enclose a street address, private bag, or any other similar official address.
Public AddressLine As System.String
[C#]
public System.String AddressLine;
Remarks
The bold portion of the following address is an AddressLine property:
"1 Microsoft Way, Redmond, WA 98052, United States"
To find an intersection, separate the intersecting street names with a space, an ampersand (&;), and another space. For example:
Bellevue Ave E & E Roy St
MapPoint Web Service finds only street addresses and intersections, not post office box addresses.
Any internal routing information—such as department name, suite number within a building, or internal mailstop number—contained in an AddressLine property is removed in the FindResult object returned by the FindAddress and ParseAddress methods of the FindServiceSoap class.
Maximum string size is 1024 characters.
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
Address Class | FindResult Class | FindServiceSoap.FindAddress Method | FindServiceSoap.ParseAddress Method