FindServiceSoap.FindAddress Method

FindServiceSoap.FindAddress Method

Finds geographic locations in a specified data source based on an address (sometimes known as geocoding). Returns an array of possible results ordered by score, the top score, the number of results found, and the index into the array of results, as a FindResults object. Maximum value returned is 100. Default number of returned results is 25.


Public Function FindAddress (ByVal specification As FindAddressSpecification) _
    As FindResults

[C#]

public FindResults FindAddress (FindAddressSpecification specification);

Parameters

  • specification
    The specification of the request to find an address (FindAddressSpecification object), including the address to find, the results range to return, the threshold score for results returned, the search context, a flag to identify which objects you want in the returned results, and the data source in which to search.

Remarks

  • The FindAddress method is valid with the MapPoint.AP, MapPoint.BR, MapPoint.EU, and MapPoint.NA data sources. For general information about the MapPoint Web Service data sources, see MapPoint Web Service Data Sources and Capabilities.

  • Address information can be returned from only certain countries or regions within the MapPoint.AP, MapPoint.BR, MapPoint.EU, and MapPoint.NA data sources.

  • Assigning a range or start index that is greater than 100 with this method does not cause any errors in your applications. However, this method does not return any valid addresses when such range or start index is assigned.

  • If no results are found, the returned FindResults.NumberFound property value is 0.

Example

[Visual Basic]

Dim findServiceSoap As FindServiceSoap = New FindServiceSoap
findServiceSoap.Credentials = _
   New NetworkCredential(myMapPointUserId, mySecurePassword)

Dim findByIDSpecification As FindByIDSpecification = New FindByIDSpecification
findByIDSpecification.DataSourceName = "MapPoint.FourthCoffeeSample"
findByIDSpecification.Filter = New FindFilter
findByIDSpecification.Filter.EntityTypeName = "FourthCoffeeShops"
Dim nums1 As Integer() = New Integer() {-21835, -21836}
findByIDSpecification.EntityIDs = nums1
Dim findResults As FindResults = findServiceSoap.FindByID(findByIDSpecification)



[C#]

FindServiceSoap findService = new FindServiceSoap();
findService.Credentials = 
    new System.Net.NetworkCredential(myMapPointUserId, mySecurePassword);

FindByIDSpecification findbyidspec = new FindByIDSpecification();
findbyidspec.DataSourceName = "MapPoint.FourthCoffeeSample";
findbyidspec.Filter = new FindFilter();
findbyidspec.Filter.EntityTypeName = "FourthCoffeeShops";
int[] arrayID = {-21835, -21836};
findbyidspec.EntityIDs = arrayID;

FindResults foundResults;
foundResults = findService.FindByID(findbyidspec);


See Also

  FindServiceSoap Class   |   FindResults Class   |   FindAddressSpecification Class   |   EntityType.Definition Property   |   CommonServiceSoap.GetEntityTypes Method