Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message : "TypeError: Cannot read properties of undefined (reading 'Poly') #690

Open
2 tasks
muhamedoufi opened this issue Mar 29, 2023 · 1 comment
Open
2 tasks

Comments

@muhamedoufi
Copy link

muhamedoufi commented Mar 29, 2023

Hi there,
before submitting a new issue, please consider the following:

    // create the routing control and add it to the map
    var routCtrl = new L.Routing.control({
        waypoints:[
            L.latLng(18.0928, -15.9611),
            L.latLng(18.084189686687818, -15.966320625599066)
        ],
        router: L.Routing.osrmv1({
        serviceUrl: 'http://127.0.0.1:5000/route/v1'
    }),
      
    
    }).addTo(map);

i use my self hosting for osrm as docker image

@curtisy1
Copy link
Collaborator

This is definitely interesting. I suspect it happens when OSRM fails to find a route and as such does not return a proper polyline. Can you please do the following to help me troubleshoot this?

  1. If you have some sort of Javascript call stack or stack trace, please paste all of it here as I currently have no idea what a Poly is (except for it being undefined)
  2. Run a test request against your local docker image to see if the request works. You can use cURL and simply replace this url with your localhost/127.0.0.1 (as you can see, the official demo server returns no route)
  3. Tell me which version of leaflet and LRM you're using and how you load them (unpkg, webpack, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants