Click or drag to resize
LegacyTelogisServiceForwardGeocode Method
Print this page
Returns the geographic location and full street address for a given address.

Namespace: Telogis.API
 
Syntax
public GeocodeResult[] ForwardGeocode(
	string addressText,
	Country country
)

Parameters

addressText
Type: SystemString
An address string, in a 'natural' format.
country
Type: Telogis.APICountry
The country in which this address is located.

Return Value

Type: GeocodeResult
An array of GeocodeResult objects representing the geocode search results. You should check the length of this array - if the geocode search didn't find any results this array will be of length zero.
Remarks
See ReverseGeocode(LatLon) to convert a latitude-longitude coordinate to an address.
Examples
C#
int i = 0;
GeocodeResult[] results = service.ForwardGeocode("85 enterprise, aliso viejo, ca", Country.USA);
foreach (GeocodeResult gr in results) {
    Console.WriteLine("{0} {1}", ++i, gr.Address);
    // pull the location (as a LatLon) of your chosen result using gr.LatLon...
}
See Also