Syntax 

int PCMSFindPOIsAlongRoute2(Trip trip, int legIndex, int sortOrder, float offRouteDistThreshold, const int *pPOITypes, int numPOITypes)


Parameters 

Trip trip – The handle of the trip to search along. The trip must be run prior to executing the search.


int legIndex – Index of the leg to conduct the search along.

 

int sortOrder – Determines how the result list will be sorted.

                           0 = Distance from the trip’s origin.

                           1 = Drive time from the trip’s origin.

 

float offRouteDistThreshold – Sets the off route distance threshold to use when filtering the POI list. The default setting is 5 miles. If you want to keep the default value, set this parameter to zero or a negative number. Any value greater than zero will be accepted as the new off route distance threshold.


const int *pPOITypes – An array of POI type identifiers to be included in the search. To get the index values, use PCMSGetNumFPARPOICategories and PCMSGetFPARPOICategoryName.


int numPOITypes – The number of POI types in the array.


Description

Finds Places of Interest (POIs) that are along a specified leg of a route. The search is conducted along the entire leg. You can also specify what types of POIs to search for.

 

The search will filter the list by how far a POI is off the route. By default, only POIs that are less than or equal to 5 miles off route will be included in the final result list (5 driven miles, not air miles.) This distance threshold can be changed.


PCMSFindPOIsAlongRoute can be used to find POIs within a user-specified window of distance or time along the route.

 

Note: Performance speed of this API can vary greatly depending on how wide you make the search window, how long the leg of the route is, and how dense the areas are that the route passes through.


Return Values 

A negative one (-1) indicates an error has occurred. Zero (0) indicates no POIs of the specified types were found within the start and end points along the route. A positive value is the number of results found.


Supported Since: PC*MILER|Connect 29

Category: Find Places Along Route (FPAR)