Click or drag to resize

AutocompleteGeocoderGeocode Method (AutocompleteGeocoderBaseArgs)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Generate address suggestions, based on the provided AutocompleteGeocoderBaseArgs object.

Namespace:  Telogis.GeoBase.Geocoding
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public static AutocompleteGeocoderResult Geocode(
	AutocompleteGeocoderBaseArgs args
)

Parameters

args
Type: Telogis.GeoBase.GeocodingAutocompleteGeocoderBaseArgs
A AutocompleteGeocoderBaseArgs object specifying geocoding arguments.

Return Value

Type: AutocompleteGeocoderResult
A AutocompleteGeocoderResult object, containing an array of suggestions along with a status code.
Remarks
Due to the potential for latency, running this method on a non-UI thread is recommended. See the Autocomplete Geocoder Tutorial for an example of a threaded implementation.
Examples
C#
AutocompleteGeocodeArgs args = new AutocompleteGeocodeArgs("20 Enterprise, Aliso", Country.USA, LatLon.Empty, TimeSpan.FromSeconds(1));
AutocompleteGeocoderResult result = AutocompleteGeocoder.Geocode(args);
if (result.Status == SearchResult.SearchCompleted && result.Suggestions.Length == 0) {
 Console.WriteLine("No results found.");
} else if (result.Status == SearchCancelled) {
 Console.WriteLine("Search was canceled.");
} else {
 if (result.Status == SearchResult.TooManyResults || result.Status == SearchResult.Timeout) {
     Console.WriteLine("Too many results for the string provided. Further qualify the address to see further suggestions.");
 } else if (result.Status == SearchResult.SearchCompleted) {
     Console.WriteLine("Search completed.");
 }
 foreach (AutocompleteGeocoderSuggestion suggestion in result.Suggestions) {
     Console.WriteLine(suggestion.ToString());
 }
}
See Also