Skip to main content

JSON Objects

Contents

The following JSON Objects are shared among the APIs in our React Native module.

ArrivalTimeWindowInfo

ArrivalTimeWindowInfo is a JSON object that is used to assign a time window. Date information (i.e., day, month and year) is optional, but minutes from midnight is required. If user only specifies minutes from midnight, CoPilot will use today’s date. Minutes from midnight is the time since midnight in minutes. For example, if minutes from midnight is set to 960, this equates to a time of 4:00PM.
React Native
>=10.14
Type
JSON Object
{
  "day": 24,
  "minutesFromMidnight": 1000,
  "month": 9,
  "year": 2019
}
FieldDescriptionType
dayThe arrival day.
integer
minutesFromMidnightMinutes from midnight is the time since midnight in minutes. For example, if minutes from midnight is set to 960, this equates to a time of 4:00PM.
integer
monthThe arrival month.
integer
yearThe arrival year.
integer

Coordinate

A JSON object representing a latitude and longitude.
React Native
>=10.14
Type
JSON Object
{
  "latitude": 40.361264,
  "longitude": -74.601512
}
FieldDescriptionType
latitudeLatitude coordinate
double
longitudeLongitude coordinate
double

CopilotVersion

A JSON object that includes details of the currently installed CoPilot application version number as well as the map data release (year and quarter).
React Native
>=10.14
Type
JSON Object
{
  "appVersion": "10.15.0.24",
  "dataVersion": "GRD_ALK.NA-base-4.2017.03.13.6.1.2"
}
FieldDescriptionType
appVersionThe CoPilot application version
string
dataVersionThe CoPilot map data version
string

Country

A JSON object that contains information about a country. This object provides the user with information detailing the country name in both local and set language, country code, drive side, currency, unit of measurement and also the language(s) spoken in that country.
React Native
>=10.14
Type
JSON Object
{
  "countryCode": "United States",
  "countryName": "United States",
  "countryNameInLang": "United States",
  "currency": "U.S. Dollar(USD)",
  "distantUnits": 1,
  "driverSide": 1,
  "languages": "English",
  "speedInfo": "NA"
}
FieldDescriptionType
countryCodeThe country code of the country
string
countryNameThe name of the country
string
countryNameInLangThe name of the country in CoPilot’s current language
string
currencyThe currency used in the country
string
distantUnitsThe distance units used in the country UnitsOfMeasure
driverSideThe side of the road on which the country drives DriveSide
languagesA list of the languages spoken in the country
string
speedInfoThe speed info used in the country
string

DistanceUnit

Representation of a distance.
React Native
>=10.14
Type
JSON Object
{
  "internalDistance": 2
}
FieldDescriptionType
internalDistanceDistance in miles
double

Lane

A JSON object that contains information about a lane.
React Native
>=10.14
Type
JSON Object
{
  "isValid": true,
  "laneMarker": 0,
  "turnCode": 1
}
FieldDescriptionType
isValidWhether or not the lane is valid.
boolean
laneMarkerThe LaneMarker, DASHED and SOLID. LaneMarker
turnCodeThe turning code. i.e. STRAIGHT, LEFT, RIGHT, SHARP_LEFT, SHARP_RIGHT, UTURN, WAYPOINT etc.
TurnCode

LaneAssistInfo

A JSON object that contains a list of lanes associated with a lane assist event.
React Native
>=10.14
Type
JSON Object
{
  "lanes": [
    {
      "isValid": true,
      "laneMarker": 0,
      "turnCode": 1
    },
    {
      "isValid": true,
      "laneMarker": 1,
      "turnCode": 2
    },
    {
      "isValid": true,
      "laneMarker": 0,
      "turnCode": 3
    }
  ]
}

Leg

A JSON object the represents a “leg” of a trip. A “leg” is the route in between 2 points. This leg object contains the 2 points, and information about the leg such as the amount of time required to traverse the leg and the ETA for the destination. The origin stop of the first leg will “move” with each change in current position.
React Native
>=10.14
Type
JSON Object
{
  "eta": "2019-09-24T16:39:20-0400",
  "trafficDelay": 5.82,
  "time": 113.26922477003252,
  "distance": 62.58,
  "originStop": {
    "geocodingAddressErrors": [],
    "county": "Mercer",
    "distance": 60,
    "stopArrivalStatus": 0,
    "percent": 10000,
    "geocodingPlaceErrors": [],
    "zip": "08540",
    "longitude": -74.599148,
    "name": "",
    "stopSide": -1,
    "icon": "",
    "note": "",
    "id": "",
    "city": "Princeton",
    "state": "NJ",
    "ssal": 0,
    "currentETA": "",
    "latitude": 40.361457,
    "isDestination": true,
    "linkID": 792,
    "isVehicleRestricted": false,
    "timeZoneOffset": 0,
    "gridID": 15414796,
    "country": "",
    "streetAddress": "1 Independence Way",
    "plannedDuration": 0
  },
  "destinationStop": {
    "geocodingAddressErrors": [],
    "county": "New York",
    "distance": 4,
    "stopArrivalStatus": 0,
    "percent": 2419,
    "geocodingPlaceErrors": [],
    "zip": "10001",
    "longitude": -73.993123,
    "name": "",
    "stopSide": -1,
    "icon": "",
    "note": "",
    "id": "",
    "city": "New York",
    "state": "NY",
    "ssal": 0,
    "currentETA": "",
    "latitude": 40.748797,
    "isDestination": true,
    "linkID": 529,
    "isVehicleRestricted": false,
    "timeZoneOffset": 0,
    "gridID": 19445260,
    "country": "",
    "streetAddress": "",
    "plannedDuration": 0
  }
}
FieldDescriptionType
destinationStopThe destination stop on the leg. Stop
distanceThe distance remaining to traverse the leg. This will be the distance in either KM or Mi depending on whether or not CoPilot is set to use metric or standard measurements.
double
etaThe time at which the user will reach the destination stop of the leg. This time is represented in local time at the destination.
string
originStopThe origin stop on the leg. Stop
timeThe time remaining, in minutes, to traverse the leg.
double
trafficDelayThe traffic delay, in minutes, being added to the leg’s remaining travel time.
double

LicenseMgtInfo

Overview
DescriptionA JSON object object representing login info for companies that manage their CoPilot licenses via the Account Manager.
Supported on React Native Since Version10.14.0.487
TypeJSON Object
{
  "assetID": "name",
  "companyID": "id",
  "externalAccountID": "id",
  "partnerID": "id"
}
FieldDescriptionType
assetIdThe identifier for the asset you assigned a license to in the Account Manager. (It could be a company issued device ID, driver ID, email address, phone number, device descriptor, or vehicle number.)
string
companyIDThe company identifier for Account Manager assigned by Trimble MAPS.
string
externalAccountIdA partner’s ID for their end customer using CoPilot.
string
partnerIdThe Partner ID assigned by Trimble MAPS to a partner whose customers are deploying CoPilot.
string

MapInfo

Overview
DescriptionA JSON object that contains information about a particular set of map data. This includes the region, name, version, year and quarter that is currently downloaded and in use on a device.
Supported React Native Since Version10.14
TypeJSON Object
{
  "set": 332,
  "versionString": "GRD_ALK.NA-Eastern-332.2017.03.13.6.1.2-v1",
  "year": 2017,
  "quarter": 3,
  "name": "Eastern",
  "fileSize": 477316922,
  "downloadSize": 0
}
FieldDescriptionType
downloadSizeThe download count
long
fileSizeThe map file size
long
nameThe name
string
quarterThe quarter
int
setThe MapRegion MapRegion
versionStringThe version
string
yearThe year
int

OptInHeader

Overview
DescriptionOptimization/ETA calculation header information including start time, starting position, ending position and a time out duration.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "endStopLatLon": {
    "latitude": 40.728546,
    "longitude": -73.994264
  },
  "isETACalculation": "boolean",
  "optDeliveryType": "OptimizationDeliveryType",
  "startStopLatLon": {
    "latitude": 40.361264,
    "longitude": -74.601512
  },
  "startTime": 420,
  "timeout": 60
}
FieldDescriptionType
endStopLatLonLat/Lon of the ending stop from where route will be end, often a depot.
coordinate
    
  
isETACalculationWhether or not it is an ETA calculation or an Optimization. True: It will only do ETA calculation. False: It will do optimization.
boolean
optDeliveryTypeType of optimization delivery whether single time window, dual time window or single time window with block time. OptimizationDeliveryType
startStopLatLonLat/Lon of the starting stop from where route will be started, often a depot.
coordinate
    
  
startTimeStart Time of the trip in minutes from midnight (07:00 AM can be represented as 60*7 = 420, 14:30 PM can be represented as 60*14 + 30 = 870).
short
timeoutTimeout in seconds. Will timeout if the route calculation has not completed within the required period.
short

OptimizationOutStop

Overview
DescriptionOptimized output stop information including original stop number, optimized stop sequence number, ETA and distance of the stop.
Supported on React Native Since Version9.6.0.821
TypeJSON Object
{
  "distance": 120.5,
  "eta": 420,
  "optimizedStopNo": 1,
  "stopNo": 2
}
FieldDescriptionType
distanceThe travel distance of the stop.
double
etaETA based on optimized stop sequence for optimization while given sequence for ETA calculation. (Minutes starting from midnight. For example, 7 a.m. can be represented by 60*7 = 420; 2.30 p.m. can be represented using 60*14 + 30 = 870).
short
optimizedStopNoOptimized stop sequence number. This will only be use in optimization. This will be ignored for ETA calculation.
short
stopNoStop sequence number provided by the CPIK libraries application while sending the optimization request.
short

OptStopList

Overview
DescriptionA JSON object of input stop information including stop details, start time, end time, waiting time, optional further start/end time, and optional block time..
Supported on React Native Since Version10.14
TypeJSON Object
{
  "address": "1 independence way",
  "city": "princeton",
  "clusterID": "abc123",
  "county": "",
  "deliveryPickupType": 1,
  "latLon": {
    "latitude": 40.361264,
    "longitude": -74.601512
  },
  "name": "myStop",
  "opt2ndTimeOrBlockWindowEnd": 750,
  "opt2ndTimeOrBlockWindowStart": 720,
  "stateOrCountry": "US",
  "stopNo": 1,
  "timeWindowEnd": 450,
  "timeWindowStart": 420,
  "waitTime": 10,
  "zip": "08540"
}
FieldDescriptionType
addressThe address of the stop.
string
cityThe city of the stop.
string
clusterIDCluster ID can be used to modify the CoPilot clustering logic. It is not recommended that this is used as standard. Consultation with Trimble MAPS on the implementation is recommended.
string
countyThe county of the stop.
string
deliveryPickupTypeWhether the stop is a delivery or a pickup.
short
latLonThe coordinates of the stop.
coordinate
    
  
nameDescriptive name for the stop. This will be displayed on stop labels throughout the application.
string
opt2ndTimeOrBlockWindowEndEnd time for second or block time window.
short
opt2ndTimeOrBlockWindowStartStart time for second or block time windows (Minutes starting from midnight.) If there is no second time window, then pass 0.
short
stateOrCountryThe state of country of the stop.
string
stopNoStop sequence number. For a Normal stop, it must be start with 1. Maximum stops supported are 999. Stop sequence number will be unique and help to map when the optimization engine returns the optimization/ETA calculation result. For a Break stop, it must start with 1001. For a Static stop, it must start with 2001. Further details on static stops can be found within the CoPilot Feature Guide.
short
timeWindowEndEnd time for time window for the stop. (Minutes starting from midnight.)
short
timeWindowStartStart time for time window for the stop. (Minutes starting from midnight.)
short
waitTimeWait time (Seconds). The wait time is the time the driver will be at the stop completing the required task before continuing driving.
short
zipThe ZIP/postal code of the stop.
string

OverSpeedLimitWarning

Overview
DescriptionA JSON object that contains information related to the speed limit exceeded event.
Supported on Android Since Version10.14
TypeJSON Object
{
  "currentSpeed": 65,
  "isTruck": true,
  "speedLimit": 50
}
FieldDescriptionType
currentSpeedThe current speed the user is traveling.
int
isTruckReturns whether or not this is a truck speed limit. (This is applicable for Europe only.)
boolean
speedLimitThe current speed limit of the road on which the user is traveling.
int

PositionInfo

Overview
DescriptionA JSON object that contains information about the current position.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "latLong_mapSnapped": {
    "latitude": 0,
    "longitude": 0
  },
  "latLong": {
    "latitude": 40.361368,
    "longitude": -74.599225
  },
  "numTrackedSatellites": -1,
  "altitude": 103.8822539522266,
  "fixQuality": 2,
  "timeStamp": "2019-09-24T15:27:28-0400",
  "heading": 189.140625,
  "speed": 0,
  "numSatellites": 0
}
FieldDescriptionType
altitudeAltitude in feet
double
fixQualityQuality of a GPS lock
int
headingHeading in degrees
double
latLongPosition - absolute
coordinate
    
  
latLong_mapSnappedPosition - snapped to the nearest road
coordinate
    
  
numSatellitesNumber of satellites contributing fix information to CoPilot’s best know position
short
numTrackedSatellitesNumber of satellites being tracked
short
speedSpeed in either mph or km/h depending on CoPilot’s unit setting
double
speedMPHSpeed in MPH
double
timeStampTime in UTC
date

RestrictedDimensions

Overview
DescriptionA JSON object that contains information about road restrictions based on a vehicle’s size.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "height": 162,
  "length": 636,
  "width": 102,
  "weight": 80000,
  "weightPerAxle": 34000
}
FieldDescriptionType
heightHeight restriction
short
lengthLength restriction
short
widthWidth restriction
short
weightWeight restriction
short
weightPerAxleWeight per axle restriction
short

Road

Overview
DescriptionA JSON object that is created and populated by CoPilot on a getCurrentRoad call. The information in the road object only pertains to the portion of the road corresponding to the current GPS position.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "isStateOversized": false,
  "country": {
    "languages": ["English"],
    "currency": "U.S. Dollar (USD)",
    "driverSide": 1,
    "countryCode": "United States",
    "unitsOfMeasure": 1,
    "countryNameInLang": "United States",
    "countryName": "United States",
    "speedInfo": "NA"
  },
  "isPropaneRestricted": false,
  "speedLimit": 0,
  "hasOversizedAccess": false,
  "state": "New Jersey",
  "isOvertakingProhibited": false,
  "minimumHouseNum": 1,
  "routeNumberList": [],
  "isTruckDesignated": false,
  "isCommercialProhibited": false,
  "region": "North America",
  "maximumHouseNum": 1,
  "zip": "08540",
  "isUnnamedRoad": false,
  "city": "Princeton",
  "allowedVehicleTypes": [1, 2, 4, 8, 16, 32, 256, 4096, 8192],
  "hasToll": false,
  "roadSubClass": 0,
  "name": "Independence Way",
  "isUrban": false,
  "isInNationalNetwork": false,
  "truckSpeedLimit": 0,
  "isTrailersForbidden": false,
  "roadClass": 8,
  "hazMatRestrictions": []
}
FieldDescriptionType
maximumHouseNumThe highest address number on this road link.
int
minimumHouseNumThe lowest address number on this road link.
int
speedLimitThe speed limit of this road link.
int
truckSpeedLimitThe truck speed limit. If there is no truck specific speed limit, it will be 0.
int
isUrbanWhether or not this road is in an urban area. Urban roads are prone to congestion and should be avoided by through traffic.
boolean
hasTollWhether or not a toll must be paid to access this link.
boolean
nameThe name of the road that the link is a part of.
string
cityThe city that this road is located in.
string
stateThe name of the state where the link is located.
string
countryInformation about the country where the link is located. country
regionThe region that this road is located in.
string
zipThe ZIP/postal code that this road is located in.
string
routeNumberListThe list of route numbers that are associated with this road.
string
allowedVehicleTypesAn array specifying which vehicle types which are allowed to access this road. AllowedVehicleType
isInNationalNetworkWhether this road is part of the National Network is a government-designed system of highways.U.S. Only
boolean
isCommercialProhibitedWhether this road is Commercial Prohibited, which designates a road that cannot be driven on by a truck under any circumstances
boolean
isTruckDesignatedWhether this road is Truck Designated—a high-quality, rural highway, usually divided, that is not limited access but lacks congestion and has few stoplights.
boolean
isStateOversizedWhether this road is State Oversized—state-designated oversized highways that are similar to highways in the National Network.U.S. Only
boolean
isPropaneRestrictedWhether propane is restricted on this road.
boolean
isTrailersForbiddenWhether or not trailers are forbidden on this road.
boolean
hasOversizedAccessWhether this road is State Oversizedstate—designated oversized highways that are similar to highways in the National Network.U.S. Ony
boolean
isOvertakingProhibitedWhether or not overtaking (passing) is prohibited on this road.
boolean
isUnnamedRoadWhether or not the current road is unnamed.
boolean
roadClassThis road’s class. RoadClass
roadSubClassThis road’s subclass. RoadSubClass
dimensionRestrictionsThe truck restrictions on this road. RestrictedDimensions
hazmatRestrictionsThe hazmat restrictions of this road. HazmatType

RoadSpeeds

Overview
DescriptionA JSON object representing road speeds for certain types of roads including interstate, divided highway, primary, secondary, local, ferry and ramp.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "secondary": 40,
  "interstate": 65,
  "local": 32,
  "ferry": 18,
  "divided_highway": 55,
  "primary": 50,
  "ramp": 30
}
FieldDescriptionType
closedSpeed for closed roads
int
interstateSpeed for interstates
int
divided_highwaySpeed for divided highways
int
primarySpeed for primary roads
int
ferrySpeed for ferries
int
secondarySpeed for secondary roads
int
rampSpeed for ramps
int
localSpeed for local roads
int
noneSpeed for undefined road type
int

RoadSpeedSet

Overview
DescriptionA JSON object representing a set of road speeds. This object contains a vehicle type, as well as individual speeds for urban / rural roads of types interstate, divided highway, primary, secondary, local, ferry and ramp.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "ruralSpeeds": {
    "secondary": 40,
    "interstate": 65,
    "local": 32,
    "ferry": 18,
    "divided_highway": 55,
    "primary": 50,
    "ramp": 30
  },
  "urbanSpeeds": {
    "secondary": 16,
    "interstate": 55,
    "local": 12,
    "ferry": 18,
    "divided_highway": 30,
    "primary": 25,
    "ramp": 25
  },
  "vehicleType": 0,
  "jurisdiction": "Alabama"
}
FieldDescriptionType
vehicleTypeThe VehicleType VehicleType
jurisdictionThe jurisdiction
string
urbanSpeedsUrban road speeds RoadSpeeds
ruralSpeedsRural road speeds RoadSpeeds

SpeedUnit

Overview
DescriptionRepresentation of a speed.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "internalSpeed": 30
}
FieldDescription
internalSpeedSpeed in mph

Stop

Overview
DescriptionA JSON Object containing stop information.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "ssal": 1,
  "latitude": 40.74007,
  "state": "NY",
  "plannedDuration": 5,
  "streetAddress": "117 East 23rd Street",
  "country": "",
  "gridID": 19445260,
  "timeZoneOffset": -240,
  "isVehicleRestricted": false,
  "icon": "myicon",
  "note": "mynote",
  "earliestArrivalTime": {
    "month": 9,
    "day": 24,
    "minutesFromMidnight": 1000,
    "year": 2019
  },
  "geocodingAddressErrors": [],
  "linkID": 332,
  "isDestination": true,
  "city": "New York",
  "id": "myid",
  "percent": 2345,
  "geocodingPlaceErrors": [],
  "stopSide": -1,
  "name": "New York Sample",
  "longitude": -73.985898,
  "zip": "10010",
  "latestArrivalTime": {
    "month": 9,
    "day": 24,
    "minutesFromMidnight": 1000,
    "year": 2019
  },
  "currentETA": "2019-09-24T18:14:40-04:00",
  "customFields": {
    "k1": "v1"
  },
  "stopArrivalStatus": 4,
  "distance": 4,
  "county": ""
}
FieldDescriptionType
cityCity for the stop
string
countryCountry of the stop
string
countyCounty for the stop
string
customFieldsCustom Field for the stop that is used when providing a custom chevron display to the driver
string
earliestArrivalTimeThe Earliest acceptable Arrival Time when the stop can be reached
ArrivalTimeWindowInfo
    
  
geocodeTypeThe GeocodeSearchType
GeocodeSearchType
    
  
iconThe icon image for a stop. Image of the matching name must be saved as a .png file in the save folder of the map data being used in CoPilot.
string
idThe stop ID
string
isDestinationWhether or not this stop is to be a waypoint.
boolean
latlonCoordinates for the stop
coordinate
    
  
latestArrivalTimeThe Latest Arrival Time for Time Window the stop should be reached
ArrivalTimeWindowInfo
    
  
nameA custom ID for the stop
string
noteA custom note against the stop that will be shown on the stop details screen within the CoPilot UI
string
plannedDurationThe planned duration for the stop. This should reflect all the non-driving (dwell) time at the destination.
int
postcodeThe ZIP/postal code for the stop
string
ssalThe Side of Street Adherence for the stop
StopSideAdherenceLevel
    
  
stateState for the stop
string
stopArrivalStatusStatus of the stop—OnTime,AtRisk,Late,Early,NotViable
StopArrivalStatus
    
  
stopNumberThe stop number in a route
int
stopSideThe side of street for the stop
StopSide
    
  
streetAddressThe street address for the stop
string
percent, gridID, linkIDInternal Trimble MAPS fields with street information that is consumed by other React Native APIs.

StopBuilder

Overview
DescriptionA JSON Object containing stop information.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "ssal": 1,
  "percent": 0,
  "isDestination": true,
  "timeZoneOffset": 0,
  "stopArrivalStatus": 0,
  "postcode": "10010",
  "isVehicleRestricted": false,
  "link": 0,
  "geocodeType": 0,
  "distance": 0,
  "grid": 0,
  "stopSide": 0,
  "plannedDuration": 10,
  "country": "USA",
  "name": "New York Sample",
  "streetAddress": "117 East 23rd Street",
  "state": "NY",
  "city": "New York",
  "id": "myid",
  "note": "mynote",
  "icon": "myicon",
  "earliestArrivalTime": {
    "day": 27,
    "month": 9,
    "year": 2019,
    "minutesFromMidnight": 1000
  },
  "latestArrivalTime": {
    "day": 27,
    "month": 9,
    "year": 2019,
    "minutesFromMidnight": 1100
  },
  "customFields": {
    "k1": "v1"
  },
  "longitude": -73.987673,
  "latitude": 40.7399605
}
FieldDescriptionType
cityCity for the stop
string
countryCountry of the stop
string
countyCounty for the stop
string
customFieldsCustom Field for the stop that is used when providing a custom chevron display to the driver
string
earliestArrivalTimeThe Earliest acceptable Arrival Time when the stop can be reached ArrivalTimeWindowInfo
geocodeTypeThe GeocodeSearchType GeocodeSearchType
iconThe icon image for a stop. Image of the matching name must be saved as a .png file in the save folder of the map data being used in CoPilot.
string
idThe stop ID
string
isDestinationWhether or not this stop is to be a waypoint.
boolean
latlonCoordinates for the stop coordinate
latestArrivalTimeThe Latest Arrival Time for Time Window the stop should be reached ArrivalTimeWindowInfo
nameA custom ID for the stop
string
noteA custom note against the stop that will be shown on the stop details screen within the CoPilot UI
string
plannedDurationThe planned duration for the stop. This should reflect all the non-driving (dwell) time at the destination.
int
postcodeThe ZIP/postal code for the stop
string
ssalThe Side of Street Adherence for the stop StopSideAdherenceLevel
stateState for the stop
string
stopArrivalStatusStatus of the stop—OnTime,AtRisk,Late,Early,NotViable StopArrivalStatus
stopNumberThe stop number in a route
int
stopSideThe side of street for the stop StopSide
streetAddressThe street address for the stop
string
percent, gridEmpty placeholders for internal Trimble MAPS fields with street information that is consumed by other React Native APIs.

StreetSearchResult

Overview
DescriptionRepresentation of a street name and its distance from a location.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "streetName": "independence way",
  "distance": 12.1
}
FieldDescriptionType
streetNameThe name of the street found in the search
string
distanceThe distance of the street from a specified location
number

TruckWarning

Overview
DescriptionA JSON object that contains information associated with truck warnings, such as turn restrictions, sharp curves and notifications of fuel stops ahead.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "approachingTruckWarningDistance": 2.5,
  "latitude": 40.361264,
  "longitude": -74.601512,
  "heading": 119,
  "warningType": 0
}
FieldDescriptionType
approachingTruckWarningDistanceDistance to the approaching warning.
double
latitude and longitudeCoordinates of the warning.
double
headingDirection of travel.
long
warningTypeTruckWarningType of this event. TruckWarningType

TurnInstruction

Overview
DescriptionContains information related to turn-by-turn guidance instructions.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "isUnnamedRoad": false,
  "isRoundAbout": false,
  "turnIconForTurnAfterNext": 31,
  "streetNameForNextTurn": "US-1 North",
  "exitNumber": "12.9 mi",
  "exitRoadName": "",
  "guidanceInstruction": "Turn right on US-1 North (Brunswick Pike)",
  "roundAboutExitNumber": 0,
  "distanceToTurnAfterNext": "12.9 mi",
  "distanceToNextTurn": "200 ft",
  "turnIconForNextTurn": 2
}
FieldDescriptionType
distanceToNextTurnDistance until the approaching turn
string
distanceToTurnAfterNextThe distance until the next (not the approaching) turn. If the driver is supposed to turn onto Street A and then Street B, this will return the distance until Street B.
string
exitNumberThe exit number
string
guidanceInstructionThe next guidance instruction
string
isRoundAboutWhether or not the upcoming turn occurs on a roundabout
boolean
isUnnamedRoadWhether or not the the street to be turned onto is unnamed
boolean
roundAboutExitNumberWhich exit number on the roundabout a turn is to be made. If the turn is not on a roundabout, this value will be zero.
int
streetNameForNextTurnThe name of the street that the driver should turn onto next
string
turnIconForNextTurnThe turn icon ID for the upcoming turn. TurnArrowImage
turnIconForTurnAfterNextThe turn icon ID for the turn after the approaching turn. If the driver is supposed to turn onto Street A and then Street B, this will return the icon ID for the turn onto Street B. TurnArrowImage

VehicleDimensions

Overview
DescriptionRepresents the dimensions of a vehicle. These dimensions are set as part of a routing profile and are used in CoPilot for Truck routing profiles.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "height": 162,
  "length": 636,
  "width": 102,
  "weight": 80000,
  "weightPerAxle": 34000
}
FieldDescriptionType
lengthThe length of the vehicle
int
widthThe width of the vehicle
int
heightThe height of the vehicle
int
totalWeightThe total weight of the vehicle
int
weightPerAxleThe weight per axle of the vehicle
int

VehicleRoutingProfile

Overview
DescriptionA JSON Object describing the collection of options CoPilot uses to select the most appropriate route based on your preferences and vehicle type.
Supported on React Native Since Version10.14
TypeJSON Object
{
  "name": "I",
  "fiftyThreeFootRouting": true,
  "hazmatType": 0,
  "internationalBordersOpen": true,
  "propanRestricted": false,
  "routingType": 0,
  "userCreated": true,
  "ferriesDiscouraged": false,
  "stateNatlNetwork": true,
  "vehicleType": 9,
  "dims": {
    "height": 162,
    "width": 102,
    "weightPerAxle": 34000,
    "length": 636,
    "totalWeight": 80000
  },
  "tollRoads": 2,
  "londonCongestionZone": 0,
  "londonLowEmissionZone": 0,
  "tunnelCode": 0,
  "elevation": {
    "internalDistance": 2000
  },
  "governor": {
    "internalSpeed": 30
  }
}
FieldDescriptionType
nameThe unique name of the VehicleRoutingProfile.
string
vehicleTypeThe vehicle type of the VehicleRoutingProfile. VehicleType
userCreatedWhether or not the profile is user created.
Boolean
routingTypeThe routing type to use for this profile. RoutingType
ferriesDiscouragedWhether or not the usage of ferries is discouraged.
Boolean
tollRoadsWhether or not the usage of toll roads is discouraged. TollRoads
internationalBordersOpenWhether or not international borders are open. Set false to minimize the number of international border crossings.
Boolean
propaneRestrictedWhether or not to avoid propane restricted roads.
Boolean
stateNatlNetworkState + National Network routing favors the US Federally designated National Network (primary Interstates with reasonable entry/egress points up to 1 mile off the Interstate) and state-designated extensions to the National Network.US only.
Boolean
fiftyThreeFootRoutingWhether or not to incorporate roads that permit 53’ trailers or twins.
Boolean
londonCongestionZoneHow to route with respect to the London Congestion Zone. RestrictedZonePreference
londonLowEmissionZoneHow to route with respect to the London Low Emission Zone. RestrictedZonePreference
tunnelCodeHow to route with respect to European Tunnel Codes for hazardous materials. EUTunnelCode
hazmatTypeHow to route with respect to the transportation of hazardous materials. HazmatType
elevationWhether to discourage routing above a certain altitude. DistanceUnit
governorThe governor speed SpeedUnit
dimsDimensions of the vehicle. VehicleDimensions

WeightUnit

Overview
DescriptionRepresentation of a weight.
Supported on React Native Since Version10.14
TypeJSON Object
{
    "internalWeight: 80000,
}
FieldDescriptionType
internalWeightWeight in pounds
double
Last updated March 9, 2022.
Contents