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
Process the requests in my server #140
Comments
Hello, Would you please suggest how did you manage to resolve this issue? I am also facing same error saying "414 Request-URI Too Large" since I am trying draw route with lot of coordinates. Thank you |
If you already have a lot of coordinates, you most likely don't want to route between them, and OSRM will fail since the URI is too large. (A side note: OSRM is not my server, it's hosted by the OSRM project.) If you just want to draw a line, use a polyline in Leaflet, or maybe use OSRM is great if you want to find the route between a couple of waypoints, not if you already have tens or hundreds of coordinates! |
Hello Perliedman, Thank you for your quick response. Currently, we are using polyline of leaflet. But the challenge we are having with it is that due to some reasons if we miss some GPS coordinates from GPS device, polyline draw straight line into the map, it doesn't follow the actual road/route on the map. The purpose of using this plugin is that, its follow the proper route path on the map. Would you suggest any possible solution in this regards. Edit: this is a project requirement to draw the route on lots coordinates since we tracking locations of vehicles having GPS device. Thank you |
@SamSalman I think what you want is OSRM's map matching functionality, that can be used to clean up a GPS trace. It's suited for pushing a lot of vertices, compared to the routing functionality. |
I really appreciate your quick response. I looked into the OSRM map matching algorithm. It says " Large jumps in the timestamps (>60s) or improbable transitions lead to trace splits if a complete matching could not be found". Since we fully rely on GPS device to sends GPS coordinates to our server, we have faced issue that device doesn't send any GPS coordinates for hour(s). In this scenario service match algorithm will not work and it will break the route. Any suggestions, thank you in advance. |
@SamSalman I assume you could break this into multiple operations: use matching for parts where gps positions are frequent, and use routing, two waypoints at a time or so, for the parts where the device has been offline. |
Thank you for your response. is there any other way to clear route completely? Thank you in advance. |
That is weird. Could you post some sample code, or ideally make a jsfiddle that reproduces the problem? |
@perliedman Now after some amendment, route is getting clear successfully. But in console I received many Bad requests error: Here is my implementation: clearRoute: function(){ mainRoute: function(route){ drawRoute: function(coordinates){ Thank you |
Hard to tell without being able to step through the code, but I would check what the |
@perliedman Thank you for your response. So as I said: |
@SamSalman ok, added a new issue, #153, for this. Thanks for reporting! |
Hi, awesome work with this plugin, but I have a issue. I need to send a lot of coordinates, but I get this error from your server since you only support the GET request, "414 Request-URI Too Large", so my question is: Can I use my server to process the request instead of yours, so I can change it to POST? If so, what do I have to change to make this happen? Thanks in advance.
The text was updated successfully, but these errors were encountered: