
Chapter 13: Finding Locations
Overview of the Data.Find Namespace
MapXtreme v7.1 268 Developer Guide
.FindAddressRange
The FindAddressRange object represents an address range item returned from the Find.Search
method. The FindAddressRange object is returned as part of the FindResult object when a street
address is not found, the address number is not within the minimum/maximum address ranges for a
given street, or an address number was not specified.
Code Sample
public void GetAddressRangesOnStreetTable()
{
Table_table;
_table =
Session.Current.Catalog.OpenTable("North_Greenbush.tab");
Find _find = new Find(_table,_table.TableInfo.Columns[1]);
FindResult _findResult= _find.Search("Meadow Dr");
If ((!_findResult.ExactMatch) && (_findResult.NameResultCode ==
FindNameCode.ExactMatch)&& (findResult.AddressResultCode ==
FindAddressCode.AddressNumNotSpecified))
{
FindAddressRangeEnumerator _enum =
_findResult.GetAddressRangeEnumerator();
FindAddressRange _findAddressRange;
int _iIndex = 0;
while (_enum.MoveNext())
{
_findAddressRange = _enum.Current;
Console.WriteLine("_findAddressRange.BeginRange");
Console.WriteLine("_findAddressRange.EndRange");
_iIndex++;
}
if(_table != null)
{
_table.Close();
Method Description
Search Searches a mappable table for a named location and returns a
FindResult object.
SearchIntersection Searches a mappable street table for a given intersection, returning
a FindResult object.
Dispose Releases unmanaged resources held by the Find object. It is
necessary to call this method when finished with the Find object.
Comentarios a estos manuales