FoundLocation[] findLocation( Map map, int nFinder, string[] fields)
Finds location(s) by the specified parameters.

Parameters:
map - Map object
nFinder - the number of a given finder
fields - string array

For the USA map you can use the following constants:
ADDRESS = 0
INTERSECTION = 1
ZIP = 2
CITY = 3
COUNTY = 4
AREACODE = 5
COORDINATES = 6

Additional parameters depend on the amount and order of the fields of the specified finder. For example, the ADDRESS finder has the following fields (the order of the fields is important): 'Address', 'ZIP', 'City', 'State'. Therefore, if you want to find an address you must use the following syntax:
string[] fields = new string[] { "380 New York St", "92373", "Redlands", "CA"};
FoundLocation[] locs = findLocation( map, ADDRESS, fields);
or
FoundLocation[] locs = findLocation( map, ADDRESS, new string[] { "380 New York St", "92373", "Redlands", "CA"})

Note that you can omit the city and state fields you don't want to enter them (or use city and state, if you do not have the ZIP Code):
string[] fields = new string[] { "380 New York St", "92373"}; equals
string[] fields = new string[] { "380 New York St", "92373", "", ""};

Other examples:
string[] fields = new string[] { "Redlands", "CA"};
FoundLocation[] locs = findLocation( map, CITY, fields);
string[] fields = new string[] { "Redlands"};
FoundLocation[] locs = findLocation( map, CITY, fields); (results equal Redlands, CA and Redlands, CO)
string[] fields = new string[] { "Orange", "CA"};
FoundLocation[] locs = findLocation( map, COUNTY, fields);
string[] fields = new string[] { "New York St", "W Park Ave", "", "Redlands", "CA"};
FoundLocation[] locs = findLocation( map, INTERSECTION, fields);

Returns:
An array of the FoundLocation objects, or null if the location is not found (see the FoundLocation object)


// Finders (USA map)
public const int ADDRESS = 0;
public const int INTERSECTION = 1;
public const int ZIP = 2;
public const int CITY = 3;
public const int COUNTY = 4;
public const int AREACODE = 5;
public const int COORDINATES = 6;

// Finders (North American map)
public const int NA_US_ADDRESS = 0;
public const int NA_CA_ADDRESS = 1;
public const int NA_US_INTERSECTION = 2;
public const int NA_CA_INTERSECTION = 3;
public const int NA_US_ZIP = 4;
public const int NA_US_ZIP3 = 5;
public const int NA_CA_POSTALCODE = 6;
public const int NA_US_CITY = 7;
public const int NA_CA_CITY = 8;
public const int NA_US_COUNTY = 9;
public const int NA_AREACODE = 10;
public const int NA_COORDINATES = 11;

public FoundLocation[] findLocation( Map map, int nFinder, string[] fields)
{
	
    if( fields.Length < 1)
        return( null);
		
    FinderList finders = map.getFinders();
    Finder finder = finders.getFinder( nFinder);
	
    for(int i=0; i < finder.getFieldCount(); i++)
    { 
        string fValue = i >= fields.Length ? "" : fields[i];
        finder.setFieldValue(i, fValue);
    }
	
    Recordset rs = finder.find();

    if( isRSEmpty( rs)) return( null);
	
    FoundLocation[] Locations = new FoundLocation[rs.getRecordsCount()];
    
    int j = 0; rs.moveFirst();
	
    do
    {
        Locations[j++]=new FoundLocation(
                    rs.getAsIntByName("SCORE"),
                    rs.getAsStringByName( "NAME"),
                    rs.getAsDoubleByName( "X"),
                    rs.getAsDoubleByName( "Y"),
                    rs.getAsDoubleByName( "LAT"),
                    rs.getAsDoubleByName( "LONG")
                    );
    }
    while( rs.moveNext());

    return Locations;
}


public bool isRSEmpty(Recordset rs)
{
    return( rs == null || rs.getRecordsCount() == 0);
}


public class FoundLocation
{
    public double x;
    public double y;
    public double lat;
    public double lon;
    public string label;
    public int score;

    public FoundLocation(int score, string label, double x, double y, double lat, double lon)
    {
        this.score = score;
        this.label = label;
        this.x = x;
        this.y = y;
        this.lat = lat;
        this.lon = lon;
    }
}