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

220
Views
¿Cómo mejorar este código javascript? funciona para destinos ABC, pero no es dinámico, hay una bolsa cuando quiero ir al destino "D"

Podría ser un problema de algoritmo.

usó

 var markers = new Map(); (for markers) var routes = new Array(); (for lines from pt a to b and etc)

 const step = (pointsObj) => { if (pointsObj.i < routes.length) { if (routes.length > 1) // move the user along the line by 1 step () var pointA = routes[pointsObj.i]; var pointB = routes[pointsObj.i + 1]; // user moving gradually to the next point userMarker.setLatLng( new L.LatLng( userMarker.getLatLng().lat + (pointB.lat - pointA.lat) / maxNumSteps, userMarker.getLatLng().lng + (pointB.lng - pointA.lng) / maxNumSteps ) ); // number of steps user taking to move forward currentNumSteps++; // once the user reaches point B, set pointA = pointB and pointB = point C if (currentNumSteps == maxNumSteps) pointsObj.i++; } };
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!