Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
He creado rutas en el mapa, pero al hacer clic en cualquier ventana de información de ruta no se muestra

Tengo rutas dibujadas desde el Punto A hasta el Punto B. No puedo mostrar la información de la ruta en las rutas igual que aparece en el mapa de Google.

Necesito hacer que se vea como el mapa de Google.

y cuando el usuario haga clic en cualquier ruta, la misma ruta debería mostrarse seleccionada.

imagen izquierda personalizada, imagen derecha google maps

Los siguientes son el código.

 function calculateRoutes(pierLocation, destinationLocation) { var request = { origin: document.getElementById("from").value, destination: document.getElementById("to").value, travelMode: "DRIVING", provideRouteAlternatives: true, unitSystem: google.maps.UnitSystem.IMPERIAL, }; directionsService.route(request, function (result, status) { if (status === "OK") { directionsDisplay.setDirections(result); var summaryPanel = document.getElementById("directions-panel"); summaryPanel.innerHTML = ""; for (var x = 0; x < result.routes.length; x++) { new google.maps.DirectionsRenderer({ map: map, directions: result, routeIndex: x, }); summaryPanel.innerHTML += "<hr><br><b> Route " + (x + 1) + ":<br>"; var route = result.routes[x]; for (var y = 0; y < route.legs.length; y++) { var routeSegment = y + 1; } } } else { window.alert("Directions request failed due to " + status); } }); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!