Click or drag to resize

DDGCStreetSearcher Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Carries out asynchronous street search operations on behalf of a DrillDownGeoCoder.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBaseAsyncSearcherStreetData, StreetSearchResult
    Telogis.GeoBaseDDGCStreetSearcher

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class DDGCStreetSearcher : AsyncSearcher<StreetData, StreetSearchResult>

The DDGCStreetSearcher type exposes the following members.

Properties
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 DDGCStreetSearcher object belonging to a DrillDownGeoCoder instance can be obtained by calling the DrillDownGeoCoder.GetStreetSearcher() method.

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

The set of streets searched will be limited to the regions set on the parent DrillDownGeoCoder. 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);

    // Assume we have set the following regions:
    // Region 0 - California
    // Region 1 - Orange
    // Region 2 - Aliso Viejo

    DDGCStreetSearcher streetSearch = ddgc.GetStreetSearcher();
    streetSearch.OnFoundResults += new Action<StreetSearchResult>(streetSearch_OnFoundResults);
    streetSearch.ChangeSearchTerm("Enterprise");
}

void streetSearch_OnFoundResults(StreetSearchResult obj) {
    if (obj.Status != SearchResult.Searching) {
        foreach (StreetData sd in obj.Results) {
            Console.WriteLine(sd.CollatedName);
        }
    }
}

// Output:
// Enterprise
// Enterprise Ct/Way
See Also