DrillDownGeoCoder Class |
Namespace: Telogis.GeoBase
The DrillDownGeoCoder type exposes the following members.
Name | Description | |
---|---|---|
DrillDownGeoCoder |
Creates a new DrillDownGeoCoder in the specified country.
|
Name | Description | |
---|---|---|
Country |
The country this DrillDownGeocoder was initialized to.
| |
MixSuburbsAndCities |
Determines whether cities and suburbs are treated as members of the same region level.
| |
NumRegionLevels |
The maximum number of levels in the country's region hierarchy. The hierarchy is determined
by the subdivision of administrative regions in the country. In the U.S. there are 3
levels: State, County and City.
| |
SearchNeighbouringRegions |
Switch to turn on or off the search for neighboring regions.
|
Name | Description | |
---|---|---|
AbortGetRegions |
Ends or cancels an asynchronous region search operation.
| |
AbortGetStreets |
Ends or cancels an asynchronous street search operation.
| |
BeginGetRegions |
Begins an asynchronous region search operation.
| |
BeginGetStreets |
Begins an asynchronous street search operation.
| |
CanGetStreet |
Determines whether the DrillDownGeoCoder can retrieve streets.
| |
Dispose |
Use this method to free the resources allocated to the drilldown geocoder when it is no longer used.
| |
EndGetRegions |
Waits until the search has finished, then returns the search results.
| |
EndGetStreets |
Waits until the search has finished, then returns the search results.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetCurrentPostcode |
Returns the postcode that the DrillDownGeocoder is currently working with.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetLargestUnsetLevel |
Gets the level of the largest unset region. For example, in the U.S., if you have already set the state
(level 0) this will return 1, which corresponds to the county level.
| |
GetPostCodeLocation |
Get the general location of the currently set postcode.
See SetPostcode() to set the postcode.
| |
GetRegions(Int32) |
Get the regions that are available in a certain level.
| |
GetRegions(Int32, Int32) |
Get the regions that are available in a certain level. For example, having set the state to California (level 0),
calling GetRegions(1) will return regions like Los Angeles county, San Francisco county, San Bernardino county etc.
| |
GetRegions(Int32, String) |
Gets all the regions beginning with the specified search term at the given level.
| |
GetRegions(Int32, String, Int32) |
Searches a specified region level for a region beginning with the given search string.
| |
GetRegionSearcher |
Returns a DDGCRegionSearcher object that performs asynchronous region searches.
This object is unique to the DrillDownGeoCoder instance, will cease to function correctly if the DrillDownGeoCoder
is disposed.
| |
GetStreets(String) |
Get the streets in the smallest set region that begin with the given search string.
| |
GetStreets(String, Int32) |
Get the streets in the smallest set region that begin with the given search string.
| |
GetStreetSearcher |
Returns a DDGCStreetSearcher object that performs asynchronous street searches.
This object is unique to the DrillDownGeoCoder instance, will cease to function correctly if the DrillDownGeoCoder
is disposed.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasDrillDownGeoCoder |
Used to determine whether the information required to perform a drill-down geocode in the specified country
is present in the repository.
| |
IsSet |
Determine whether the specified level has been set to a particular region.
| |
ListSetRegions |
Returns a list of regions corresponding to each level in the country.
| |
Reset |
Reset all the regions, allowing a clean start.
| |
Reset(Int32) |
Reset a specified level.
| |
SetPostcode |
Set a postcode for the DrillDownGeocoder to work with.
| |
SetRegion |
Set the DrillDownGeocoder region.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Related articles: Drill-down Geocoder Tutorial.
// // First, we'll check that we can create a DrillDownGeoCoder in the USA. // If we can create one, we'll do so. If not, the code will silently exit. // if (!DrillDownGeoCoder.HasDrillDownGeoCoder(Country.USA)) return 0; DrillDownGeoCoder ddgc = new DrillDownGeoCoder(Country.USA); Console.WriteLine("DDGC Created"); // // Next, we'll find out how many region levels (state, country etc) we need to set // int numRegionLevels = ddgc.NumRegionLevels; // // Get the all possible regions in the first (zeroth) region level... // Often, you'll want to start a loop here: // for (each region level) { // while (not yet made a selection) { // display list of options; // ask user to make a selection; // } // set this region level; // move on to the next region level; // } RegionSearchResult rsr = ddgc.GetRegions(0); RegionData[] regionData = rsr.Results; // // You could output them for the user to make a selection // - this could also be done using a combo/list box // for (int i = 0; i < regionData.Length; i++) Console.WriteLine(regionData[i].ToString()); // // If you know the start of the region name, you can get a list of // possible regions with a filter applied: // rsr = ddgc.GetRegions(levelNumber, startOfName); regionData = rsr.Results; // // Suppose that the second region (element 1) in the regions[] array is the desired // region for this level, you should set this region in the DrillDownGeoCoder: // ddgc.SetRegion(regionData[1]); // // Repeat the process for the remaining region levels. // Then, a similar procedure should be made using the ddgc.GetStreets() method. // This will give a list of appropriate streets. If implemented well, // a DrillDownGeoCoder provides a fast and effective way of locating a street. // // if (all region levels set) { // get the first letter of the street name; // display list of matching streets to user; // let the user make a selection; // display streetData information (location/name of street etc); // } // Once you've found a street you can use the StreetData.GetAddressLocation // method to find the exact location of an address (specified by street number)