Click or drag to resize

Address Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Represents a physical address retrieved from reverse geocoding. (Reverse geocoding is the process of resolving a location to an Address). An Address may contain such information as street number, street name, city, county and state.

See also GeocodeAddress for the address type returned from forward geocoding.

Inheritance Hierarchy

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class Address

The Address type exposes the following members.

Constructors
  NameDescription
Public methodAddress
Default Constructor, creates an empty Address.
Top
Properties
  NameDescription
Public propertyCode exampleCity
The name of the city. This value may be null if relevant city data is unavailable.
Public propertyCode exampleCountry
The Country in which this Address is located.
Public propertyCode exampleCounty
The name of the county. This value may be null if relevant county data is unavailable or not applicable at this location.
Public propertyCode exampleExtendedNameInfo
Array of street name information for the street (some streets may have more than one name).
Public propertyFormattedAddress
Returns a long line formatted string representing a structured address returned from a geocoding operation.
Public propertyCode exampleLine1 Obsolete.
Returns a formatted string representing the first line of a street address.
Public propertyCode exampleNames
Array of street names for the street (some streets may have more than one name).
Public propertyCode exampleNumber
Number on street, -1 if no number.
Public propertyCode examplePostalCode
The postal (ZIP) code associated with this address.
Public propertyCode examplePrimaryName
The primary name for the street.
Public propertyCode exampleRegion
Name of the largest administrative region (for example: State name in the USA, Bundesländer name in Germany, or the Province name in Britain). Region may be null if no data is available.
Public propertyCode exampleRegions
Contains the list of regions for this address, with the most specific region (eg suburb or city) first.
Public propertyCode exampleStreetNumberFull
The street number of the address e.g. 20, 5b or 10-12.
Public propertyCode exampleSubRegions
Suburb and regions where this address is located that subdivide the city.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleToGeocodeResult
Returns the raw address used for a geocoding operation as a GeocodeResult.
Public methodToString
Returns a formatted string containing address information, such as may be printed on an envelope.
(Overrides ObjectToString.)
Top
Remarks
Examples
An Address is returned by a call to ReverseGeoCode(LatLon). Such a call may be made as follows. Imagine that a user has clicked on a point on an IMap, generating a mouse event which we have resolved to a LatLon, and we would like to retrieve the address as a formatted string, in the form "Found [number] [street name] ([alternate name]) in [country]":
C#
public string getFormattedAddress(LatLon location) {

    // Use the location LatLon to lookup the Address.
    Address addr = Telogis.GeoBase.GeoCoder.ReverseGeoCode(location);

    string formattedAddress;

    // "Found 455 Blenheim Rd [Sh 73a], Christchurch, Christchurch City, Canterbury, 8042"
    formattedAddress += "Found " + addr.FormattedAddress;

    // Add the first alternative name (if present) in parentheses
    // NOTE: Alternate names aren't ranked
    if (addr.Names.Length > 1) {
        formattedAddress += (" (" + addr.Names[1] + ")");
    }    

    // Add the country, if not the USA
    if (addr.Country != Country.USA) {
        formattedAddress += (" in " + CountryToString.ToString(addr.Country));
    }

    // "Found 455 Blenheim Rd [Sh 73a], Christchurch, Christchurch City, Canterbury, 8042 (Blenheim Rd [Sh 73a]) in New Zealand"
    // or, if Blenheim Road was in the US, simply: "Found 455 Blenheim Rd [Sh 73a], Christchurch, Christchurch City, Canterbury, 8042 (Blenheim Rd [Sh 73a])"
    return formattedAddress;

}
See Also