Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

324
Visualizações
How to get route distance with Mapquest.js?

I am writing a code to find the optimum route. I am using L.mapquest and I am getting the route plot on leaflet. However, I need the distance and time of such route but I can't figure out how to do this. Can someone help me, please?

The following is a piece of code:

function findRouteForWaypoints(event){
    event.preventDefault();
    L.mapquest.key = config.MY_API_TOKEN;

    var dir = L.mapquest.directions().route({
      start: ''.concat(startPointLatitude,',',startPointLongitude),
      end: ''.concat(endPointLatitude,',',endPointLongitude),
      waypoints: binWaypoints,
      optimizeWaypoints: true
    })
}
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use the route callback function to get other route parameters like distance. https://developer.mapquest.com/documentation/mapquest-js/v1.3/l-mapquest-directions-route/

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda