const axios = require('axios'); require('dotenv').config({ path: '.env' }); async function testSteps() { const apiKey = process.env.API_MAPS; const resToll = await axios.post('https://routes.googleapis.com/directions/v2:computeRoutes', { travelMode: 'DRIVE', routingPreference: 'TRAFFIC_UNAWARE', origin: { address: "25 Impasse du Puits du Suc, Saint-Martin-en-Haut, France" }, destination: { address: "Toulouse, France" }, }, { headers: { 'Content-Type': 'application/json', 'X-Goog-Api-Key': apiKey, 'X-Goog-FieldMask': 'routes.legs.steps.navigationInstruction,routes.legs.steps.distanceMeters,routes.legs.steps.startLocation,routes.legs.steps.endLocation' } }); const steps = resToll.data.routes[0].legs[0].steps; for(let i=0; i