Skip to main content

PCMSSetRoadSpeedType

Syntax

int PCMSSetRoadSpeedType(Trip trip, int roadSpeedOption)

Parameters

  • Trip trip – Handle to a trip.
  • int roadSpeedOption – Set to one (1) to use PC*MILER’s average road speeds by road type or set to two (2) to use historical traffic data.

Description

Sets whether time estimate (ETA) calculations for a route will be based on the traditional PC*Miler average road speeds by road type or historical traffic data. (A license for the Traffic add-on is required for traffic data.)

Return Values

Standard Returns

Sample Code

// Add the stops to trip
ret = PCMSAddStop(trip, "Liverpool, NY");
ret = PCMSAddStop(trip, "Boston, MA");
ret = PCMSAddStop(trip, "Philadelphia, PA");
ret = PCMSAddStop(trip, "Baltimore, MD");

// Set Road Speed Type
ret = PCMSSetRoadSpeedType(trip, 2);

Supported Since: PC*Miler Connect 29

Category: Trip Options

Last updated July 19, 2025.