Click or drag to resize

DDGCRegionSearcher Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Carries out asynchronous region search operations on behalf of a DrillDownGeoCoder.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBaseAsyncSearcherRegionData, RegionSearchResult
    Telogis.GeoBaseDDGCRegionSearcher

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.86.0.0
Syntax
public class DDGCRegionSearcher : AsyncSearcher<RegionData, RegionSearchResult>

The DDGCRegionSearcher type exposes the following members.

Properties
  NameDescription
Public propertyLevel
Gets or sets the region level within which to search.
Public propertySearchDelay Obsolete.
Delay before the search starts. This is to give the user a chance to change the search term before committing to starting the search.
(Inherited from AsyncSearcherResultElementT, ResultT.)
Public propertyStatus Obsolete.
Returns the state of the asynchronous search.
(Inherited from AsyncSearcherResultElementT, ResultT.)
Top
Methods
  NameDescription
Public methodChangeSearchTerm
Execute a new search, while retaining any search results that match the new query string. Calling this method will abort any search currently in progress.
(Inherited from AsyncSearcherResultElementT, ResultT.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
Remarks

The DDGCRegionSearcher object belonging to a DrillDownGeoCoder instance can be obtained by calling the DrillDownGeoCoder.GetRegionSearcher() method.

Caution note Caution
If the parent DrillDownGeoCoder is disposed of, the DDGCRegionSearcher will cease to function correctly.

The set of regions searched at a given region level will be limited by the regions set on the parent DrillDownGeoCoder; e.g. if Region 0 (State) is set to California, then a search of Region 1 (County) will only return counties within California. When the ChangeSearchTerm(String) method is called, a new search will begin; when this search is complete, the OnFoundResults event will fire. If a new search term is entered before the previous search has completed, the previous search will be aborted.

Examples
C#
public void DDGCDemo() {
    DrillDownGeoCoder ddgc = new DrillDownGeoCoder(Country.USA);
    DDGCRegionSearcher regionSearch = ddgc.GetRegionSearcher();
    regionSearch.OnFoundResults += new Action<RegionSearchResult>(regionSearch_OnFoundResults);
    regionSearch.Level = 0;
    regionSearch.ChangeSearchTerm("New");
}

void regionSearch_OnFoundResults(RegionSearchResult obj) {
    if (obj.Status != SearchResult.Searching) {
        foreach (RegionData rd in obj.Results) {
            Console.WriteLine(rd.Name);
        }
    }
}

// Output:
// New Hampshire
// New Jersey
// New Mexico
// New York
See Also