Click or drag to resize

GeoCoderGeoCode Method (String, String, String, String, Country, Int32)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Geocode from address components.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public static GeocodeAddress[] GeoCode(
	string address,
	string city,
	string region,
	string postalCode,
	Country country,
	int maxResults
)

Parameters

address
Type: SystemString
Street address - eg '1234 Main St', or a street intersection eg '18th & placentia'.
city
Type: SystemString
City name or null blank if unknown.
region
Type: SystemString
Region (state) or null.
postalCode
Type: SystemString
Postal code or null.
country
Type: Telogis.GeoBaseCountry
Country.
maxResults
Type: SystemInt32
Maximum number of results to return

Return Value

Type: GeocodeAddress
Zero or more GeocodeAddress results.
Remarks

This form of geocode is likely to be more reliable than the free text geocode.

The geocoder is capable of looking up street intersections when they are specified with the & (ampersand) or @ characters. For example:

18th & placentia, costa mesa18th @ placentia, costa mesa

Related articles: Geocoding Concept, Map Control Tutorial.

Examples
C#
// Geocode an address and return a maximum of five results
GeocodeAddress[] addr = GeoCoder.GeoCode("20 Enterprise", "Aliso Viejo", "California", "92656", Country.USA, 5);
// Write out the first address in the array
Console.WriteLine("Found address {0}", addr[0].ToString());
// Prints 'Found address 20 Enterprise, Aliso Viejo, California, 92656, USA'
See Also