AddressNameInfoIsPrimaryName Property |
Namespace: Telogis.GeoBase
// Set a location (San Joaquin Hills Trans Corridor, Los Angeles) LatLon Location = new LatLon(33.593840, -117.762379); StringBuilder compiledOutput = new StringBuilder(); // Construct an Address.NameInfo array Address.NameInfo[] myStreetsArray = GeoCoder.ReverseGeoCode(Location).ExtendedNameInfo; for (int i = 0; i < myStreetsArray.Length; i++) { if (myStreetsArray[i].IsPrimaryName) { compiledOutput.AppendFormat("Street name '{0}' is this street's primary name.\n", myStreetsArray[i].Name); } else { compiledOutput.AppendFormat("Street name '{0}' is not this street's primary name.\n", myStreetsArray[i].Name); } } Console.WriteLine(compiledOutput); // Street name 'San Joaquin Hills Trans Corridor [Ca-73]' is not this street's primary name. // Street name 'Ca-73' is not this street's primary name. // Street name 'San Joaquin Hills Trans Corridor' is this street's primary name.