AddressNameInfo Class |
Namespace: Telogis.GeoBase
The AddressNameInfo type exposes the following members.
Name | Description | |
---|---|---|
AddressNameInfo |
Constructs a new NameInfo given a street name.
All other fields have default values.
|
Name | Description | |
---|---|---|
DirectionOnSign |
The direction of travel for this street if one is specified.
| |
IsHighwayName |
Whether this is the highway name of the street.
| |
IsNumber |
Returns true if the name of this street is a number.
| |
IsPrimaryName |
Whether this is a primary name.
| |
Name |
The name of the street.
|
Name | Description | |
---|---|---|
Equals |
Determines whether the specified AddressNameInfo is equal to the current AddressNameInfo.
(Overrides ObjectEquals(Object).) | |
GetHashCode |
Gets the hash code of the AddressNameInfo.
(Overrides ObjectGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
// We choose a highway location to generate several name results. LatLon SanJoaquinHillsTransCorridor = new LatLon(33.593840, -117.762379); StringBuilder compiledOutput = new StringBuilder(); Address.NameInfo[] namesArray = GeoCoder.ReverseGeoCode(SanJoaquinHillsTransCorridor).ExtendedNameInfo; for (int i = 0; i < namesArray.Length; i++) { String streetName = namesArray[i].Name; compiledOutput.AppendFormat("Found street name {0}: '{1}'. ", i + 1, streetName); Address.DirectionOnSign direct = namesArray[i].DirectionOnSign; compiledOutput.AppendFormat("The direction of the street is '{0}' ('None' if unknown). ", direct); if (namesArray[i].IsHighwayName) { compiledOutput.AppendFormat("This street name is also a highway name. "); } else { compiledOutput.AppendFormat("This street name is not also a highway name. "); } if (namesArray[i].IsNumber) { compiledOutput.AppendFormat("This street name is a number. "); } else { compiledOutput.AppendFormat("This street name is not a number. "); } if (namesArray[i].IsPrimaryName) { compiledOutput.AppendFormat("This name is the street's primary name.\n"); } else { compiledOutput.AppendFormat("This name is not the street's primary name.\n"); } } Console.WriteLine(compiledOutput); // Prints the following ----- // Found street name 1: 'San Joaquin Hills Trans Corridor [Ca-73]'. The direction of the street is 'None' ('None' if unknown). // This street name is not also a highway name. This street name is not a number. This name is not the street's primary name. // Found street name 2: 'Ca-73'. The direction of the street is 'South' ('None' if unknown). This street name is also a highway name. // This street name is not a number. This name is not the street's primary name. // Found street name 3: 'San Joaquin Hills Trans Corridor'. The direction of the street is 'None' ('None' if unknown). // This street name is not also a highway name. This street name is not a number. This name is the street's primary name.