Skip to main content

JSON Objects

Contents

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

AlternateRouteInfo

Overview
Description A JSON Object containing AlternateRouteInfo information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"m_TripID": 193
"m_MajorRoad" : "Main Street",
"m_Distance" : 6.43,
"m_ETA": 23,
"m_TrafficDelay": 5,
"m_isTrafficIncluded": true
}
Field Description Type
m_TripID Integer containing the Trip ID.
int
m_MajorRoad Name of the major road in the selected route.
string
m_Distance The distance covered by this route.
double
m_ETA The duration of time, in minutes, it takes to traverse this route.
int
m_TrafficDelay The delay, in minutes, on this leg, caused by traffic.
int
m_isTrafficIncluded Does it contain traffic on the current route.
boolean

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
}
Field Description Type
day The arrival day.
integer
minutesFromMidnight 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.
integer
month The arrival month.
integer
year The 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
}
Field Description Type
latitude Latitude coordinate
double
longitude Longitude 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"
}
Field Description Type
appVersion The CoPilot application version
string
dataVersion The 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"
}
Field Description Type
countryCode The country code of the country
string
countryName The name of the country
string
countryNameInLang The name of the country in CoPilot’s current language
string
currency The currency used in the country
string
distantUnits The distance units used in the country UnitsOfMeasure
driverSide The side of the road on which the country drives DriveSide
languages A list of the languages spoken in the country
string
speedInfo The speed info used in the country
string

DistanceUnit

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

Gate

Overview
Description A JSON Object describing a Gate object for a Site. Gates are identified as Entry, Exit, or Two Way (entry and exit). Gates also include a Gate Path—the path along the public road network to enter or exit a that gate.
Supported on React Native Since Version 10.26
Type JSON Object
{
  "gateType": GateType.ENTRY,
  "autoRestricted": true,
  "truckRestricted": false,
  "physicalCoords": {
	"Latitude": ,
	"Longitude":
},
  "snapCoords": {
	"Latitude": ,
	"Longitude":
}
  "notes": [
{
  "id": 1,
  "name": "test site",
  "address": "1 Independence Way Princeton, NJ 08540",
  "isPublic": false,
  "gates": []
}]
}
Field Description Type
gateType Gets the Gate type—Entry, Exit, or Two Way.
long
autoRestricted Indicates if the Gate is auto restricted.
boolean
truckRestricted Address for the Gate.
boolean
physicalCoords Gets the coordinates on the Site polygon where the Gate is located.
Coordinate
snapCoords Gets the coordinates on the public road network to access the Gate.
Coordinate
notes Gets driver notes associated with the Site. List

Geofence

Overview
Description A JSON Object containing Geofence information. Contains the shape (GeofenceShape.CIRCLE or GeofenceShape.POLYGON), label, name, and array of Coordinate objects that will plot the Geofence. Geofences are drawn in 2D on the map.
Supported on React Native Since Version 10.26
Type JSON Object
{
  "shape": GeofenceShape.CIRCLE,
  "label": "mylabel",
  "name": "myname",
  "points": [ {
	"latitude": 40.361221,
	"longitude": -74.599501 },
	{"latitude": 40.361221,
	"longitude": -74.600563 }]
}
Field Description Type
shape The GeofenceShape of the Geofence.
GeofenceShape
label Label for the Geofence.
string
name Name for the Geofence.
string
points An array of Coordinate points. You need at least 2 pairs of Coordinates to create a GeofenceShape.CIRCLE. For best results, the two points used to create a circular geofence should be placed at each end of the horizontal diameter of the circle. (The coordinates should have the same latitude, but a different longitude.)


More than 2 points will create a GeofenceShape.POLYGON.

GeofenceSet

Overview
Description A JSON Object containing GeofenceSet information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"name": "myGeofenceSet",
 "isPersistent" : true,
"Notification" : GeofenceNotification.ENTER,
"hasUINotification" : true,
"hasRouteThroughEvent" : true,
"activeState" : GeofenceActiveState.NONE,
"hasBeep" : true,
"fillColor" : 255,
"borderColor" : 0,
"drawUnderRoads" : false,
"borderWidth" : 2,
"geofenceList" : []
}
Field Description Type
name Name for the GeofenceSet.
string
isPersistent Boolean to determine if the geofence is persistent (saved and loaded after CoPilot is closed).
boolean
notification GeofenceNotification for the GeofenceSet.
GeofenceNotification
hasUINotification Boolean to determine whether or not the Geofences within the GeofenceSet have a UI notification.
boolean
hasRouteThroughEvent Boolean to determine whether or not the Geofences within the GeofenceSet have route-through events.
boolean
activeState The GeofenceActiveState of the GeofenceSet.
GeofenceActiveState
hasBeep Boolean to determine whether or not the Geofence has a beep sound.
boolean
fillColor The int value of the fill color (0-255).
int
borderColor The int value of the border color (0-255).
int
drawUnderRoads Boolean to determine whether or not to draw fences under roads.
boolean
borderWidth The number of Geofences added in the geofence set.
int
geofenceList An array of Geofence JSON objects to add to the GeofenceSet. Can be empty initially and added to using the addGeofence().
Geofence

GeofenceActiveState

Value Description
NONE Do not take the geofence into account while routing.
WARN Warn before routing through the geofence.
AVOID Avoid routing through the geofence.

Lane

A JSON object that contains information about a lane.
React Native
>=10.14
Type
JSON Object
{
  "isValid": true,
  "laneMarker": 0,
  "turnCode": 1
}
Field Description Type
isValid Whether or not the lane is valid.
boolean
laneMarker The LaneMarker, DASHED and SOLID. LaneMarker
turnCode The 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
  }
}
Field Description Type
destinationStop The destination stop on the leg. Stop
distance 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.
string
originStop The origin stop on the leg. Stop
time The time remaining, in minutes, to traverse the leg.
double
trafficDelay The traffic delay, in minutes, being added to the leg’s remaining travel time.
double

LicenseMgtInfo

Overview
Description A JSON object object representing login info for companies that manage their CoPilot licenses via the Account Manager.
Supported on React Native Since Version 10.14.0.487
Type JSON Object
{
  "assetID": "name",
  "companyID": "id",
  "externalAccountID": "id",
  "partnerID": "id"
}
Field Description Type
assetId 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

ManagedRouteInfo

Overview
Description A JSON Object containing ManagedRouteInfo information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"state": ManagedRouteState.ACTIVE,
"type" : ManagedRouteType.DISPATCH
}
Field Description Type
state ManagedRouteState state of the Managed Route
ManagedRouteState
type ManagedRouteType type of the Managed Route.
ManagedRouteType

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.
Supported React Native Since Version 10.14
Type JSON 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
}
Field Description Type
downloadSize The download count
long
fileSize The map file size
long
name The name
string
quarter The quarter
int
set The MapRegion MapRegion
versionString The version
string
year The year
int

Note

Overview
Description A JSON Object describing Note details for a Gate. A Note is a short message sent to the driver in CoPilot as they approach that Gate. The notification can be audible (Text-to-Speech), visual (pop-up text display), or both.
Supported on React Native Since Version 10.26
Type JSON Object
{
  "id": 1,
  "name": “test site”,
  "address": "1 Independence Way Princeton, NJ 08540",
  "isPublic": false,
  "gates": []
}
Field Description Type
noteType How the Note will be shared with the driver in the CoPilot UI.
NoteType
sequence The sequence number of a Note for gates with multiple notes. Each note’s sequence number will determine the order it is displayed in Copilot’s UI, in ascending order.
int
title The title of the pop-up message in which the Note is displayed in the CoPilot UI.
string
content The body of the pop-up message in which the Note is displayed in the CoPilot UI.
string

OptInHeader

Overview
Description Optimization/ETA calculation header information including start time, starting position, ending position and a time out duration.
Supported on React Native Since Version 10.14
Type JSON Object
{
  "endStopLatLon": {
    "latitude": 40.728546,
    "longitude": -73.994264
  },
  "isETACalculation": "boolean",
  "optDeliveryType": "OptimizationDeliveryType",
  "startStopLatLon": {
    "latitude": 40.361264,
    "longitude": -74.601512
  },
  "startTime": 420,
  "timeout": 60
}
Field Description Type
endStopLatLon Lat/Lon of the ending stop from where route will be end, often a depot.
coordinate
    
  
isETACalculation Whether or not it is an ETA calculation or an Optimization. True: It will only do ETA calculation. False: It will do optimization.
boolean
optDeliveryType Type of optimization delivery whether single time window, dual time window or single time window with block time. OptimizationDeliveryType
startStopLatLon Lat/Lon of the starting stop from where route will be started, often a depot.
coordinate
    
  
startTime Start 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
timeout Timeout in seconds. Will timeout if the route calculation has not completed within the required period.
short

OptimizationOutStop

Overview
Description Optimized output stop information including original stop number, optimized stop sequence number, ETA and distance of the stop.
Supported on React Native Since Version 9.6.0.821
Type JSON Object
{
  "distance": 120.5,
  "eta": 420,
  "optimizedStopNo": 1,
  "stopNo": 2
}
Field Description Type
distance The travel distance of the stop.
double
eta 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..
Supported on React Native Since Version 10.14
Type JSON 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"
}
Field Description Type
address The address of the stop.
string
city The city of the stop.
string
clusterID 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.
string
county The county of the stop.
string
deliveryPickupType Whether the stop is a delivery or a pickup.
short
latLon The coordinates of the stop.
coordinate
    
  
name 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.
Supported on Android Since Version 10.14
Type JSON Object
{
  "currentSpeed": 65,
  "isTruck": true,
  "speedLimit": 50
}
Field Description Type
currentSpeed The current speed the user is traveling.
int
isTruck Returns whether or not this is a truck speed limit. (This is applicable for Europe only.)
boolean
speedLimit The current speed limit of the road on which the user is traveling.
int

POIAlert

Overview
Description A JSON Object containing POIAlert information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"distanceFromCurrent": 12.3,
"latitude" : "40.74242",
"longitude" : -74.52561,
"heading" : 2.4,
"typeID" : 1,
"distanceOffRoute" : 2.3,
"distanceToDestination" : 7.8,
"alertDescription" : "description"
}
Field Description Type
distanceFromCurrent Distance from the current location.
double
latitude Latitude of the POI.
double
longitude Longitude of the POI.
double
heading What direction the POI is relative to your direction.
long
typeID The Int value of the POICategory ID.
int
distanceOffRoute How far in miles the POI is off route.
double
distanceToDestination How far the POI is to your destination in miles.
double
alertDescription Description of the alert.
string

POISearchResult

Overview
Description A JSON Object containing POISearchResult information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"category": 1,
"POIName" : "mcdonalds",
"distance" : 25.0,
"timeAway" : 30.0,
"impactDistance" : 15.2,
"impactTIme" : 23.4,
"misc" : "",
"phone" : "XXX-XXX-XXXX",
"stop" : {}
}
Field Description Type
category Category ID for the POI
int
POIName Name of the POI
string
distance How far away the POI is from current location in miles.
double
timeAway How many minutes away the POI is from the current location.
double
impactDistance Distance that going to the POI will add to your trip.
double
impactTime Time that going to the POI will add to your trip.
double
misc Miscellaneous information about the POI.
string
phone Phone number for the POI.
string

PositionInfo

Overview
Description A JSON object that contains information about the current position.
Supported on React Native Since Version 10.14
Type JSON 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
}
Field Description Type
altitude Altitude in feet
double
fixQuality Quality of a GPS lock
int
heading Heading in degrees
double
latLong Position - absolute
coordinate
    
  
latLong_mapSnapped Position - snapped to the nearest road
coordinate
    
  
numSatellites Number of satellites contributing fix information to CoPilot’s best know position
short
numTrackedSatellites Number of satellites being tracked
short
speed Speed in either mph or km/h depending on CoPilot’s unit setting
double
speedMPH Speed in MPH
double
timeStamp Time in UTC
date

RestrictedDimensions

Overview
Description A JSON object that contains information about road restrictions based on a vehicle’s size.
Supported on React Native Since Version 10.14
Type JSON Object
{
  "height": 162,
  "length": 636,
  "width": 102,
  "weight": 80000,
  "weightPerAxle": 34000
}
Field Description Type
height Height restriction
short
length Length restriction
short
width Width restriction
short
weight Weight restriction
short
weightPerAxle Weight per axle restriction
short

Road

Overview
Description 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. country
region The region that this road is located in.
string
zip The ZIP/postal code that this road is located in.
string
routeNumberList The list of route numbers that are associated with this road.
string
allowedVehicleTypes An array specifying which vehicle types which are allowed to access this road. AllowedVehicleType
isInNationalNetwork 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.
boolean
isUnnamedRoad Whether or not the current road is unnamed.
boolean
roadClass This road’s class. RoadClass
roadSubClass This road’s subclass. RoadSubClass
dimensionRestrictions The truck restrictions on this road. RestrictedDimensions
hazmatRestrictions The hazmat restrictions of this road. HazmatType

RoadSpeeds

Overview
Description A 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 Version 10.14
Type JSON Object
{
  "secondary": 40,
  "interstate": 65,
  "local": 32,
  "ferry": 18,
  "divided_highway": 55,
  "primary": 50,
  "ramp": 30
}
Field Description Type
closed Speed for closed roads
int
interstate Speed for interstates
int
divided_highway Speed for divided highways
int
primary Speed for primary roads
int
ferry Speed for ferries
int
secondary Speed for secondary roads
int
ramp Speed for ramps
int
local Speed for local roads
int
none Speed for undefined road type
int

RoadSpeedSet

Overview
Description 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.
Supported on React Native Since Version 10.14
Type JSON 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"
}
Field Description Type
vehicleType The VehicleType VehicleType
jurisdiction The jurisdiction
string
urbanSpeeds Urban road speeds RoadSpeeds
ruralSpeeds Rural road speeds RoadSpeeds

RouteSyncLocation

Overview
Description A JSON Object containing RouteSyncLocation information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"lat": 40.74642,
"lon" : -74.59212,
"isDestination" : false
}
Field Description Type
lat Latitude of the location.
double
long Longitude of the location.
double
isDestination Boolean value indicating if the location is the destination.
boolean

SafetyCamera

Overview
Description A JSON Object containing SafetyCamera information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"m_bShowing": false,
"m_fDistanceFromCurr" : 0.0,
"m_lSpeedLimit" : 0,
"m_sID" : ""
}
Field Description Type
m_bShowing Indicates if the camera is presently being shown.
boolean
m_fDistanceFromCurr Value indicating the distance to the camera from the current position.
double
m_lSpeedLimit The maximum speed that can be traveled before triggering the safety camera.
int
m_sID Description of the camera.
string

Site

Overview
Description A JSON Object describing describing a Site. A Site extends a location to include a boundary polygon around its perimeter. It may also include entry and exit points (gates), a path along the public road network to enter or exit a gate, and helpful notes for the driver upon entering the Site.
Supported on React Native Since Version 10.26
Type JSON Object
{
  "id": 1,
  "name": “test site”,
  "address": "1 Independence Way Princeton, NJ 08540",
  "isPublic": false,
  "gates": []
}
Field Description Type
id Id for the Site.
long
name Name of the Site.
string
address Address for the Site.
Address
isPublic Gets whether the Site is public (created by Trimble Maps) or user created.
boolean
gates Gets a list of gates associated with the Site.
Gate

SpeedUnit

Overview
Description Representation of a speed.
Supported on React Native Since Version 10.14
Type JSON Object
{
  "internalSpeed": 30
}
Field Description
internalSpeed Speed in mph

Stop

Overview
Description A JSON Object containing stop information.
Supported on React Native Since Version 10.14
Type JSON 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": ""
}
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
ArrivalTimeWindowInfo
    
  
geocodeType The GeocodeSearchType
GeocodeSearchType
    
  
icon The 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
id The stop ID
string
isDestination Whether or not this stop is to be a waypoint.
boolean
latlon Coordinates for the stop
coordinate
    
  
latestArrivalTime The Latest Arrival Time for Time Window the stop should be reached
ArrivalTimeWindowInfo
    
  
name A custom ID for the stop
string
note A custom note against the stop that will be shown on the stop details screen within the CoPilot UI
string
plannedDuration The planned duration for the stop. This should reflect all the non-driving (dwell) time at the destination.
int
postcode The ZIP/postal code for the stop
string
ssal The Side of Street Adherence for the stop
StopSideAdherenceLevel
    
  
state State for the stop
string
stopArrivalStatus Status of the stop—OnTime,AtRisk,Late,Early,NotViable
StopArrivalStatus
    
  
stopNumber The stop number in a route
int
stopSide The side of street for the stop
StopSide
    
  
streetAddress The street address for the stop
string
percent, gridID, linkID 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 ArrivalTimeWindowInfo
geocodeType The GeocodeSearchType GeocodeSearchType
icon The 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
id The stop ID
string
isDestination Whether or not this stop is to be a waypoint.
boolean
latlon Coordinates for the stop coordinate
latestArrivalTime The Latest Arrival Time for Time Window the stop should be reached ArrivalTimeWindowInfo
name A custom ID for the stop
string
note A custom note against the stop that will be shown on the stop details screen within the CoPilot UI
string
plannedDuration The planned duration for the stop. This should reflect all the non-driving (dwell) time at the destination.
int
postcode The ZIP/postal code for the stop
string
ssal The Side of Street Adherence for the stop StopSideAdherenceLevel
state State for the stop
string
stopArrivalStatus Status of the stop—OnTime,AtRisk,Late,Early,NotViable StopArrivalStatus
stopNumber The stop number in a route
int
stopSide The side of street for the stop StopSide
streetAddress The street address for the stop
string
percent, grid Empty placeholders for internal Trimble Maps fields with street information that is consumed by other React Native APIs.

StopClickedInfo

Overview
Description A JSON object representing a StopClickedInfo object.
Supported on React Native Since Version 10.26
Type JSON Object
{
  "stopType": StopClickType.ORIGIN_STOP,
  "stop": {
  "latitude": 40.74007,
  "state": "NY",
  "plannedDuration": 5,
  "streetAddress": "117 East 23rd Street",
  "country": "",
  "city": "New York",
  "name": "New York Sample",
  "longitude": -73.985898,
  "zip": "10010"
}
}
Field Description Type
stopType StopClickType enum
int
stop Stop JSON object
stop

StopClickType

Values
ROAD
ORIGIN_STOP
DEST_STOP
WAYPOINT
INTERMEDIATE_STOP
UNKNOWN_ERROR

StreetSearchResult

Overview
Description Representation of a street name and its distance from a location.
Supported on React Native Since Version 10.14
Type JSON Object
{
  "streetName": "independence way",
  "distance": 12.1
}
Field Description Type
streetName The name of the street found in the search
string
distance The distance of the street from a specified location
number

TrafficAlertInfo

Overview
Description A JSON Object containing TrafficAlertInfo information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"origDurationMins": 10.0,
"detourDurationMins" : 12.0,
"closureRoadName" : "Main Street"
"distance" : 0.4,
"trafficAlertType" : TrafficAlertType.TRAFFIC_ALERT_TRAFFIC_UNKNOWN
}
Field Description Type
origDurationMins The original ETA in minutes.
long
detourDurationMins The detour duration in minutes.
long
closureRoadName Retrieves the road closure name.
string
distance The distance in miles to where sudden slowdown occurred.
double
trafficAlertType The traffic alert type.
TrafficAlertType

TrafficAlertType

Values
TRAFFIC_ALERT_TRAFFIC_DETOUR
TRAFFIC_ALERT_ROAD_CLOSURE
TRAFFIC_ALERT_SLOWDOWN

TruckWarning

Overview
Description A 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 Version 10.14
Type JSON Object
{
  "approachingTruckWarningDistance": 2.5,
  "latitude": 40.361264,
  "longitude": -74.601512,
  "heading": 119,
  "warningType": 0
}
Field Description Type
approachingTruckWarningDistance Distance to the approaching warning.
double
latitude and longitude Coordinates of the warning.
double
heading Direction of travel.
long
warningType TruckWarningType of this event. TruckWarningType

TurnInstruction

Overview
Description 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
string
turnIconForNextTurn The turn icon ID for the upcoming turn. TurnArrowImage
turnIconForTurnAfterNext 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. TurnArrowImage

VehicleDimensions

Overview
Description Represents 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 Version 10.14
Type JSON Object
{
  "height": 162,
  "length": 636,
  "width": 102,
  "weight": 80000,
  "weightPerAxle": 34000
}
Field Description Type
length The length of the vehicle
int
width The width of the vehicle
int
height The height of the vehicle
int
totalWeight The total weight of the vehicle
int
weightPerAxle The weight per axle of the vehicle
int

VehicleRoutingProfile

Overview
Description A 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 Version 10.14
Type JSON 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
  }
}
Field Description Type
name The unique name of the VehicleRoutingProfile.
string
vehicleType The vehicle type of the VehicleRoutingProfile. VehicleType
userCreated Whether or not the profile is user created.
Boolean
routingType The routing type to use for this profile. RoutingType
ferriesDiscouraged Whether or not the usage of ferries is discouraged.
Boolean
tollRoads Whether or not the usage of toll roads is discouraged. TollRoads
internationalBordersOpen 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. RestrictedZonePreference
londonLowEmissionZone How to route with respect to the London Low Emission Zone. RestrictedZonePreference
tunnelCode How to route with respect to European Tunnel Codes for hazardous materials. EUTunnelCode
hazmatType How to route with respect to the transportation of hazardous materials. HazmatType
elevation Whether to discourage routing above a certain altitude. DistanceUnit
governor The governor speed SpeedUnit
dims Dimensions of the vehicle. VehicleDimensions

VoiceInfo

Overview
Description A JSON Object containing VoiceInfo information.
Supported on React Native Since Version 10.26
Type JSON Object
{
"voiceName": "John"
"langID" : 14205,
"isTTSVoice" : true,
"voiceStorage": VoiceStorage.DOWNLOADING"
}
Field Description Type
voiceName String representation of the voice’s name.
string
langID ID of the voice.
long
isTTSVoice Whether or not this voice supports text-to-speech functionality.
boolean
voiceStorage The voice’s VoiceStorage installation status.
VoiceStorage

WeightUnit

Overview
Description Representation of a weight.
Supported on React Native Since Version 10.14
Type JSON Object
{
    "internalWeight: 80000,
}
Field Description Type
internalWeight Weight in pounds
double
Last updated May 13, 2024.