Location.Address Property
Location.Address Property
The address (Address object) for the location, if available.
Public Address As Address
[C#]
public Address Address;
Remarks
If the Address property conflicts with either the Entity property or the LatLong property, the Address is overridden first by the Entity property, or if it is null, by the LatLong property.
The Address property is required if both the Entity property and the LatLong property are null.
If an address is available, the Address property is returned by the following methods:
If address information for point-of-interest data sources is available, it is returned in the Address and Entity properties by the following methods:
Example
[Visual Basic]
'Output the formatted address
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"
Dim foundAddressResults As FindResults
foundAddressResults = findService.FindAddress(findAddressSpec)
Dim fr As FindResult
For Each fr In foundAddressResults.Results
Console.WriteLine(fr.FoundLocation.Address.FormattedAddress)
Next
[C#]
//Output the formatted address
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";
FindResults foundAddressResults;
foundAddressResults = findService.FindAddress(findAddressSpec);
foreach(FindResult fr in foundAddressResults.Results)
{
Console.WriteLine(fr.FoundLocation.Address.FormattedAddress);
}
See Also
Location Class | Address Class | Location.Entity Property | Location.LatLong Property | FindServiceSoap Class