int PCMSFindFuelStopsAlongRoute2(Trip trip, int legIndex, int sortOrder, float offRouteDistThreshold, const char* pFuelProviders)


Trip trip – The ID 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 the user wants 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 char* pFuelProviders – A pipe (“|”) delimited string of fuel provider names used to filter the results list.  Valid fuel provider names can be obtained by calling PCMSGetFuelProviders.


Finds fuel stops that are along a specified leg of a route. The search is conducted along the entire leg.

The search will filter the list by how far a fuel station is off the route.  By default, only stations 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 can be changed, and can be filtered by fuel provider name, if desired.

PCMSFindFuelStopsAlongRoute can be used to find stops 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 value indicates an error has occurred. (Standard Errors)

Zero (0) indicates no POI’s of the specified types were found along this leg of the route. 

A positive value is the number of results found.

Supported Since: PC*MILER Connect 29

Category: Find Places Along Route (FPAR)