Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

179
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda