AddressExtendedNameInfo Property |
Namespace: Telogis.GeoBase
The street may be identified by a number of different names, such as the I-405 which is also known as the San Diego Freeway. In this instance the most commonly used name will be the first value in the array. Alternate names are not ranked.
Use the array.Length property to check if alternate names exist.
// Set a location (San Diego Freeway, Los Angeles) LatLon Location = new LatLon(33.668795, -117.820095); // Construct an Address.NameInfo array using ExtendedNameInfo Address.NameInfo[] AnArrayOfStreetDetails = GeoCoder.ReverseGeoCode(Location).ExtendedNameInfo; int count = 1; if (AnArrayOfStreetDetails.Length > 1) { for (int i = 0; i < AnArrayOfStreetDetails.Length; i++) { Console.WriteLine("Multiple names found. Result {0} is '{1}'", count, AnArrayOfStreetDetails[i].Name); count++; } } else { Console.WriteLine("One name found: '{0}'", AnArrayOfStreetDetails[0].Name); } // Multiple names found. Result 1 is 'San Diego Fwy [I-405]' // Multiple names found. Result 2 is 'I-405' // Multiple names found. Result 3 is 'San Diego Fwy'