Skip to main content

PCMSLatLongsEnRoute

Syntax

long PCMSLatLongsEnRoute(Trip trip, double* latlong, long numPairs)

Parameters

  • Trip trip – Handle to a trip.
  • double* latlong – An array of pairs of latitude/longitude coordinates along the given trip. Must point to a buffer large enough to hold 2*numPairs*sizeof(double). If NULL is passed as the latlong parameter, the function simply returns the total number of pairs.
  • long numPairs – Used to limit the number of coordinates returned in the latlong array, based on the actual number of points of the given trip.

Description

Retrieves a sequence of latitudes/longitudes along a trip. Best practice for this API is to call PCMSLatLongsEnRoute with latlong as NULL first in order to determine the number of actual points along the trip.

Return Values

Standard Returns

Sample Code

ret = PCMSLatLongsEnRoute(trip, NULL, 0, TRUE);
if (ret > 0)
{
  double* pLatLongs = new double[2*ret];
  ret = PCMSLatLongsEnRoute(trip, pLatLongs, ret, TRUE);
  printf("  %d latlongs found...", ret);
}

Supported Since: PC*Miler Connect 12

Category: Trip Management

Last updated July 8, 2025.