FindNearest Point of Interest

The Find Nearest Points of Interest feature finds the Points of Interests (POIs) nearest to a given location. The FindNearestPOIs method is in the AutoSuggestAPI class:

com.mapinfo.mapmarker.autosuggest.api.AutoSuggestAPI.findNearestPOIs

Note: POI features (including FindNearest Point of Interest) are available only if you have licensed and installed POI data. FindNearestPOI will not return any candidates unless you have licensed and installed POI data.

The FindNearestPOIs method accepts the following parameters and constraints.

Table 1. FindNearestPOIs Parameters and Constraints
Parameter or Constraint Values Required or Optional and Usage
Country CTY The 3-character country ISO code Optional. If not specified, all available countries are searched.
Origin The latitude/longitude of the origin. This defines the center of the search area. Required.
Maximum number of candidates MaxCandidates The maximum number of POI candidates returned. The maximum is 100. The default is 5. Optional. If maximum number of candidates is not specified, all the POIs within the Search Distance are returned. If not specified, the default of 5 candidates are returned.
Search Distance SearchDistance: The maximum distance from the origin to search. Optional. If search distance is not specified, the search distance is 5.
Search Distance Units Units: The search distance measurement unit. This can be kilometers, miles, meters, or feet. The default is kilometers. Optional. If not specified, the default distance unit is kilometers
Locale Locale is enabled only for FindNearest POI. English is always available and that is the default locale. You can also select Native if the POI categories and subcategories have been localized. Native refers to the local language for that country. Optional. If the locale is specified and that locale is available, then POIs are returned in that language. If the locale is specified but that locale is not available, then POIs are returned in English. If the locale is not specified, POIs are returned in the native (non-English) language, if available; otherwise POIs are returned in English.
Find Nearest POI in Management Console
To use this feature from the Management Console:
  1. From the GeocComplete tab under Services > Enterprise Geocomplete Module > GeoComplete, select FindNearest POI . The enables the Locale selection.
  2. From the Locale box, select the preferred locale. English is the default but you can select Native for localized categories/subcategories. Localized content is available for selected countries only.
  3. Select Max Candidates (default is 5) and Distance Unit (default is kilometers).
  4. From the Search Restrictions tab, select the Search Distance (default is 0). Zero means that there is no search distance restriction.
  5. To find the nearest point of interest, provide a name or brand and the search area origin (longitude/latitude) in the Preview tab and click Run Preview.