What is the reason for HereMap factoring in stopOver time when calculating travel time for the destination waypoint?

I am currently working on a request using the HereMap Calculate Route API. Waypoint 0 does not have any stopOver time, but waypoints 1 and 2 do have stopOver times. Below is an example of the request:

https://route.ls.hereapi.com/routing/7.2/calculateroute.json?xnlp=CL_JSMv3.1.18.1&apikey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&mode=fastest;truck;traffic:enabled&truckType=truck&representation=display&routeattributes=summary,shape,legs&legAttributes=travelTime,trafficTime&height=14&limitedWeight=7.25&trailersCount=0&alternatives=0&waypoint0=geo!41.978130,-88.232100&departure=2020-08-17T06%3A00%3A00%2B5&waypoint1=geo!stopOver,2880!41.91621,-87.99025;;03558029&waypoint2=geo!stopOver,3120!41.91621,-87.99025;;03559825&waypoint3=geo!stopOver,840!41.721474,-87.679846;;03561582&waypoint4=geo!stopOver,780!41.719577,-87.793070;;03561720&waypoint5=geo!stopOver,1800!41.690945,-87.741590;;03561712&waypoint6=geo!stopOver,1320!41.691,-87.74274;;03561312&waypoint7=geo!stopOver,780!41.839228,-88.000...

As waypoint 1 has a stopOver of 48 minutes, when I receive the response from the Calculate Route call, leg0 of the route includes the travel time along with the stop over time for waypoint1.

{travelTime: 6184, maneuver: Array(13), trafficTime: 6184}

The 6184 seconds indicated represent 55 minutes of travel time plus the 48 minutes of stop over time. In this case, it is unexpected to have stop over time included in the first leg since the truck is not stopping until waypoint1. The API documentation does not provide much information about how stopOver works. Why, in my scenario, is stopOver time included in the first leg of the route?

Answer №1

Travel time includes stopover time. Each leg of the journey involves driving and stopover time, This allows for calculating driving time by subtracting stopover time.

Furthermore, upon reviewing the response, the travel times for each leg were as follows:

  • w0-w1 : leg[0] 6182 (stopover: 2880)
  • w1-w2 : leg[1] 3120 (stopover: 3120)
  • w2-w3 : leg[2] 6373 (stopover: 840)

Could you please double-check your response results?

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Setting default property values in a React component using Typescript

   Is there a way to define default property values in React components when using Typescript? I came across a post on SE suggesting the use of a static class variable called defaultProps with key-value pairs for properties. However, this method didn&a ...

Efficient ways to temporarily store form data in React JS

When filling out a registration form and clicking on the terms and conditions link, the page redirects to that content. Upon returning to the registration page, all fields are empty and need to be filled in again from scratch. I am looking for a way to ha ...

When text is wrapped within the <li> tag

In this div, the structure is as follows: <div class="box1" id="infobox"> <h2> Point characteristics: </h2> <div style="padding-left:30px" align="left"> <ul> <li class="infobox_list"><b>X value: </b>< ...

Unable to install react-dom/test-utils using npm

I recently included two libraries in my package.json "devDependencies": { ... "react-dom/test-utils": "*", "react-test-renderer/shallow": "*" }, These were recommended by the React documentation to align with version 16 of the React ecosy ...

The attribute interface overload in Typescript is an important concept to

Consider a scenario where there are multiple payload options available: interface IOne { type: 'One', payload: { name: string, age: number } } interface ITwo { type: 'Two', payload: string } declare type TBoth = IOne ...

NodeJS: Issue with Route is disrupting the functionality of the Restful API

Struggling to develop an API using Node.js and Express, encountering routing issues with express.Router(). Take a look at my code below: Server.js file contents: // Get necessary packages var express = require('express'); var app = express(); ...

converting JSON data fetched from an API into state using setState

My goal is to properly map a JSON response into a state by excluding the first array and only displaying its children. Here is an example of what I have attempted: fetch(api).then((response) => { response.json().then((data) => { data.children. ...

Can LocalStorage be deleted when the application is not running?

Can a specific key in an application's LocalStorage be deleted without having to open the app? I'm considering creating a batch file script for removing a particular key from the app's LocalStorage while the app is not running. The challeng ...

Encountering issues with connecting to the MongoDB server through Node.js

When working with MongoDB in Python, everything runs smoothly without any errors. However, when using Node.js, an error keeps popping up. Can someone please guide me on how to resolve this issue? jdcaovuwqxoqppwwqmjcawpwuaciwowjqwqhpaiwdoqi Below is the ...

Give Jquery a quick breather

My goal is to have my program pause for 3 seconds before continuing with the rest of the code. I've been researching online, but all I can find are methods that delay specific lines of code, which is not what I need. What I would like to achieve look ...

CreateAsyncModule using an import statement from a variable

When trying to load a component using defineAsyncComponent, the component name that should be rendered is retrieved from the backend. I have created a function specifically for loading the component. const defineAsyncComponentByName = (componentName: strin ...

I attempted to craft a toggle button by applying and removing an active class that I had previously designed, but unfortunately, it did not function as intended

Every time I click on a button, I keep encountering this error message. I am certain that my selector is correct, but I can't seem to figure out why I'm getting the Uncaught TypeError: Cannot read property 'classList' of undefined at HT ...

Accessing an object within an array in a Node.js EJS file

Great job everyone! I've developed a project using Node.js which includes the following schema structure: const debt = new Schema({ name: { type: String, required: true, }, medicine: [{ data: { type: Schema.Types.ObjectId, ...

Looking to pass two distinct variables using a single props with v-if in Vue-JS. Any suggestions?

I am attempting to pass different data to my other component. Essentially, when my variable firstvalue is not null, I want to send firstvalue. Currently, this setup is functioning as expected. However, I now wish to send secondvalue if it is not null. < ...

Retrieve JSON data by making a POST request to a website's API

Can you help me retrieve Json data from a website API using JavaScript? I'm trying to fetch quotes from the following website: for my quotes generator page. While I have some understanding of making GET requests, it seems that this API requires POST ...

The JSON response is returning an undefined value

While working on my react app, I am logging JSON data from the backend of the application. When I log the main body of the data: console.log('........section2', options2ndSection[2]); The returned JSON data is as follows: Object item: ...

A guide to updating property values in an array of objects in JavaScript while ensuring they remain in consecutive order

I am dealing with an array of objects called list. The parameters rid and rorder are provided for processing. -> 1. Whenever the value of rid matches the id in the list, the itemorder is updated with the value of rorder. -> 2. In the updated list p ...

Utilize the grouping functionality provided by the Lodash module

I successfully utilized the lodash module to group my data, demonstrated in the code snippet below: export class DtoTransactionCategory { categoryName: String; totalPrice: number; } Using groupBy function: import { groupBy} from 'lodash&apo ...

Trouble arises when incorporating a new feature onto a map with OpenLayers and Vue.js

I'm currently working on integrating a custom control into my map using OpenLayers with Vue.js. The Explore.vue component is responsible for creating the "map" (olmap) with OL, and I bind it to the child component LeftSideBar2.vue. However, when att ...

Challenges with TypeScript build in DevOps related to Material UI Box Component

Currently, I am facing an issue while trying to build a front end React Typescript application using Material ui in my build pipeline on Azure DevOps. The problem seems to be related to the code for the Material ui library. Despite successfully building th ...