Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

How to calculate distance ratio with momentjs and turfjs

Hello,
With JS anf turfjs library I need on several markers calculate
1) medium speed
2) time of arrival at any marker point

I make as:


    const markerIds = Object.keys(markers)
    const points2Data = []

    let summarized_distance= 0
    let arrival_date= moment(tripRow.arrival_date)// arrival time
    let departure_date= moment(tripRow.departure_date) // departure time

    for (let i = 1; i < markerIds.length; i++) {
      const marker = markers[markerIds[i - 1]]...
Code (JavaScript):
How to calculate distance ratio with momentjs and turfjs

from JavaScript https://ift.tt/2vtvsjS
via IFTTT

Post a Comment

0 Comments