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

Routing error - HTTP request failed: [object ProgressEvent] #280

Closed
LailaMai opened this issue Jul 23, 2016 · 6 comments
Closed

Routing error - HTTP request failed: [object ProgressEvent] #280

LailaMai opened this issue Jul 23, 2016 · 6 comments

Comments

@LailaMai
Copy link

Hello guys,
Since two days ago , the map doesn't show correctly and there is an error shown in console : Routing error: Object { status=-1, message="HTTP request failed: [object ProgressEvent]"} , when I check the website http://www.liedman.net/leaflet-routing-machine , I saw the same thing, so it's certainly from the API server , is there any solution for that ?

@LailaMai
Copy link
Author

After some research I found that the problem is not from LRM but from the OSRM's demo server that comes without guarantees , and not advised for production use ... Apparently it's not the first time that happens , I spent a lot of time setting the leaflet routing map in the project and I can't deliver a work to my client that can be broken at any time , unfortunately I have to simply switch to Google map API .

@Zacaria
Copy link

Zacaria commented Jul 25, 2016

+1 Is there any update about this ?
I found that this may be a CORS issue.

Even here, the route doesn't work.

@LailaMai
Copy link
Author

@LailaMai LailaMai reopened this Jul 26, 2016
@perliedman
Copy link
Owner

@LailaMai There are cheap alternatives for using OSRM or other backends compatible with LRM, but not entirely free. On the other hand, Google Maps isn't free if your solution uses a login or is a paid service, and depending on how you see it not really free otherwise either - your users are paying by delivering data to Google.

Bottom line: if you want something to work, it will have to be paid, one way or another.

@LailaMai
Copy link
Author

@perliedman Actually I made my solution with GoogleMap Api and yeah it's not free , especially that Google has restriction on 10 waypoints per route , if you want more you have to pay for premium account .
I finally made a work around that seems to work fine with the "free" account and displayed more than 10 waypoints and multiple routes also.

@ciaran036
Copy link

Hi @Zacaria , how did you know it was a CORS issue? I'm currently experiencing this with an ASP.NET Web API app and I have been unable to figure out why I'm getting the issue.

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

4 participants