React js Calcular distancia recorrida entre coordenadas

import React,{useState} from ‘react’ const tarifaBase = 3600 const costo78metros = 120 const costoPorMinuto = 220 export default function App() { //Calcular distancia recorrida en linea recta function getKilometros(lat1,lon1,lat2,lon2){ var rad = function(x) {return x*Math.PI/180;} var R = 6378.137; //Radio de la tierra en km var dLat = rad( lat2 – lat1 ); var dLong […]