when i tried to send them to the backend via a url includes the api-key, i received the following error message
Could not find point 0: 9.5777162 43.0298891 within a radius of 350.0 meters.
the coordinates provided are in the following order
lng1,lat1,lng2,lat2
The coordinates you provided as lng1,lat1,lng2,lat2 don’t seem to have anything in common with the coordinate that is giving you the error, as they are vastly different.
Thus, as stated above, please provide the complete request you sent, along with the complete answer you got.
hey
thanks for the reply
the coordinates were obtained from the map via mouse clicks so each time the user clicks the mouse the coordinates are taken and sent to the backend.
would you please tell me what do you mean by vastly different?
moreover, distance it self is not that important, the most important to me is to receive the response from openrouteservice
there are basically two ways to use openrouteservice:
1 - create an application that uses openrouteservice API.
You have to develop something that will run a request and get some response.
2 - use our maps client (that internally uses openrouteservice API) to find places, calculate directions and isochrones.
So, what is the method you are using?
To be able to help you, it is important that you tell us, step-by-step, how to reproduce your case (if you are using the maps client) or the request code if you are using the API directly.
You can use also our Interactive documentation (API playground) to get technical details about the API Dashboard | ORS
i am using openrouteservice for the purpose you mentioned in point 1”for getting directions” .mainly I am looking for the direction and it is included in the geojson response with full data profile.
i just send a url with the api key and the start and end coordinates and i receive a json file with various info about the route between the start and end coordinates specified in the url
would you please provide a solution to this issue? why i receive such a message from the backend?
Hey,
without the actual URL you send and the response you get, we can only speculate about the reason why you are receiving this error, as we cannot reproduce your problem.
What I meant by the coordinates being vastly different is, that the coordinates you send to the backend (lng1,lat1,lng2,lat2) are somewhere in North America, while the coordinate that the backend is sending back (point 0) is somewhere in Europe.
This leads me to believe that some error happened when copy-pasting
That is why it is important for us to get the actual request you send (full URL, without api-key), so we can reproduce the problem and see what’s going on.
thanks for posting the complete request.
I’m sorry if my last reply was unclearly formulated - by stating
I didn’t mean to ask for two different URLs, one containing the api-key and one not, but for a single one that contains a placeholder instead of the key or no key at all, as stated here:
As to not have your api-key exposed to the public, I have edited your reply and hidden the revision so that it no longer contains your key. As the second URL got redundant by doing so, I have removed it as well.
On to your question:
This is acommonissue with rural or under-mapped regions:
I’d recommend actually choosing points that are routable to, that have some kind of path leading to them.
as stated above, you can use the radiuses-parameter to expand your search radius.
However, this is not possible using a GET-request like the one you provided earlier.
You’ll have to issue a POST-request to do so.
You can find all the information about this in our API-documentation.
For more information about the different body-parameters, click on the ?-icon at the right.
If you scroll down after having selected your desired endpoint, you can look at example code in various languages.
“error”: {
“code”: 2010,
“message”: “Could not find point 0: 11.1749311 75.8347632 within a radius of 8000.0 meters.; Could not find point 1: 11.1712646 75.8403257 within a radius of 8000.0 meters.”
},
I am a bit confused by this question, it sounds like this is related to whatever programming language you are using. Please refer to any documentation or forum for this language.