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.
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.
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.
The 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
eta
The time at which the user will reach the destination stop of the leg. This time is represented in local time at the destination.
The 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
companyID
The company identifier for Account Manager assigned by Trimble Maps.
string
externalAccountId
A partner’s ID for their end customer using CoPilot.
string
partnerId
The Partner ID assigned by Trimble Maps to a partner whose customers are deploying CoPilot.
string
MapInfo
Overview
Description
A 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.
ETA 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
optimizedStopNo
Optimized stop sequence number. This will only be use in optimization. This will be ignored for ETA calculation.
short
stopNo
Stop sequence number provided by the CPIK libraries application while sending the optimization request.
short
OptStopList
Overview
Description
A JSON object of input stop information including stop details, start time, end time, waiting time, optional further start/end time, and optional block time..
Cluster 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.
Descriptive name for the stop. This will be displayed on stop labels throughout the application.
string
opt2ndTimeOrBlockWindowEnd
End time for second or block time window.
short
opt2ndTimeOrBlockWindowStart
Start time for second or block time windows (Minutes starting from midnight.) If there is no second time window, then pass 0.
short
stateOrCountry
The state of country of the stop.
string
stopNo
Stop 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
timeWindowEnd
End time for time window for the stop. (Minutes starting from midnight.)
short
timeWindowStart
Start time for time window for the stop. (Minutes starting from midnight.)
short
waitTime
Wait time (Seconds). The wait time is the time the driver will be at the stop completing the required task before continuing driving.
short
zip
The ZIP/postal code of the stop.
string
OverSpeedLimitWarning
Overview
Description
A JSON object that contains information related to the speed limit exceeded event.
A 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 Version
10.14
Type
JSON 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":[]}
Field
Description
Type
maximumHouseNum
The highest address number on this road link.
int
minimumHouseNum
The lowest address number on this road link.
int
speedLimit
The speed limit of this road link.
int
truckSpeedLimit
The truck speed limit. If there is no truck specific speed limit, it will be 0.
int
isUrban
Whether or not this road is in an urban area. Urban roads are prone to congestion and should be avoided by through traffic.
boolean
hasToll
Whether or not a toll must be paid to access this link.
boolean
name
The name of the road that the link is a part of.
string
city
The city that this road is located in.
string
state
The name of the state where the link is located.
string
country
Information about the country where the link is located.
Whether this road is part of the National Network is a government-designed system of highways.U.S. Only
boolean
isCommercialProhibited
Whether this road is Commercial Prohibited, which designates a road that cannot be driven on by a truck under any circumstances
boolean
isTruckDesignated
Whether 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
isStateOversized
Whether this road is State Oversized—state-designated oversized highways that are similar to highways in the National Network.U.S. Only
boolean
isPropaneRestricted
Whether propane is restricted on this road.
boolean
isTrailersForbidden
Whether or not trailers are forbidden on this road.
boolean
hasOversizedAccess
Whether this road is State Oversizedstate—designated oversized highways that are similar to highways in the National Network.U.S. Ony
boolean
isOvertakingProhibited
Whether or not overtaking (passing) is prohibited on this road.
A 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.
{"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":""}
Field
Description
Type
city
City for the stop
string
country
Country of the stop
string
county
County for the stop
string
customFields
Custom Field for the stop that is used when providing a custom chevron display to the driver
string
earliestArrivalTime
The Earliest acceptable Arrival Time when the stop can be reached
Internal Trimble Maps fields with street information that is consumed by other React Native APIs.
StopBuilder
Overview
Description
A JSON Object containing stop information.
Supported on React Native Since Version
10.14
Type
JSON 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}
Field
Description
Type
city
City for the stop
string
country
Country of the stop
string
county
County for the stop
string
customFields
Custom Field for the stop that is used when providing a custom chevron display to the driver
string
earliestArrivalTime
The Earliest acceptable Arrival Time when the stop can be reached
Contains information related to turn-by-turn guidance instructions.
Supported on React Native Since Version
10.14
Type
JSON 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}
Field
Description
Type
distanceToNextTurn
Distance until the approaching turn
string
distanceToTurnAfterNext
The 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
exitNumber
The exit number
string
guidanceInstruction
The next guidance instruction
string
isRoundAbout
Whether or not the upcoming turn occurs on a roundabout
boolean
isUnnamedRoad
Whether or not the the street to be turned onto is unnamed
boolean
roundAboutExitNumber
Which 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
streetNameForNextTurn
The name of the street that the driver should turn onto next
The 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.
Whether or not international borders are open. Set false to minimize the number of international border crossings.
Boolean
propaneRestricted
Whether or not to avoid propane restricted roads.
Boolean
stateNatlNetwork
State + 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
fiftyThreeFootRouting
Whether or not to incorporate roads that permit 53’ trailers or twins.
Boolean
londonCongestionZone
How to route with respect to the London Congestion Zone.