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

178
Views
What are those white squares at the right side of the map in Leaflet Routing machine?

I noticed some strange white squares which bother me on my application. enter image description here

I think they are artifacts of the L.Routing.control, but i do not want them and they do not serve a function as far as i can tell. Please help me remove them.

I get them when i calculate routes like this. My main goal is to calculate all possible routes from one START to 18 Parkhouses but not to draw them. I just want to get the totalDistance and Waypoints of these objects.

My code for reference:

            route = L.Routing.control({
                name: id,
                serviceUrl: 'http://router.project-osrm.org/route/v1',
                waypoints: coords,
                plan: L.Routing.plan(coords, {
                    createMarker: function() {
                        return null;
                    }
                }),
                addWaypoints: false,
                draggableWaypoints: false,
                show: false,
                showAlternatives: true
            }).on('routesfound', function(e) {
                for (let index = 0; index < e.routes.length; index++) {
                    tmpRoutes.push(e);
                    tmpDistances.push(e.routes[index].summary.totalDistance);
                    tmpWayPoints.push(e.routes[index].waypoints)
                }
                map.removeControl(e.routes);
            }).addTo(map);
            //map.removeControl(route);
        }

Thank you!

about 4 years ago · Santiago Gelvez
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!