Attached Test AIA File To clear any designing doubts…
It is a very good extension.
Can you give the meanings of error numbers?
Every Error Which Comes Is The Response Code Of the raw response which comes back from OpenRouteService except 200. (Which means everything is ok).
If you get
4002 then you must have requested directions from the wrong coordinates.
Sorry @im_pala In my last message I told that
If you get 4003
then you must have requested directions from the same coordinates in very less time like if you call the request directions every 1 second (with clock component) it will give you that error.
And that’s wrong … Correct Is any API response code starting from 400 means that something is wrong with the request.
You can check other response codes here:
I have checked and confirmed that Navigation Extension Works With Google Maps Without Any Errors…
Use With Polyline Tool To Show Path On the Map. Like This:
Very Important note: Your App will crash if you don’t include the Maps component as it is a dependency for the extension to work.
This is really great to hear. Nice job @LetsCode.
Is it possible to make a version that don’t need OpenStreetmap?
We are trying to implement that.
after adding api key and compiling the apk from provided aia, it shows error 4003
Can you provide your blocks. 4003 means an error with the routing service.
Is it still not working? I saw last week that the website of openrouteservice was down and also of the university that is hosting it. Maybe that was the problem now also. The website of openrouteservice is working at the moment.
No, it means wrong values as written in documentation.
All error codes are here:
These are app inventor specific errors .
I disturbed the open route service staff for that and they too got confused with the error codes.
Don’t Tell Them!!
I think I need to ask the app inventor staff to tell which error refers to what because I can only understand
ERROR_INVALID_API_KEY = 4001; and
ERROR_NO_ROUTE_FOUND = 4004; but others such as
ERROR_ROUTING_SERVICE_ERROR = 4003; are not understood by its name.
ERROR_UNABLE_TO_REQUEST_DIRECTIONS is not telling its actual meaning by its name. Why it is unable to request direction it is not describing it. Is there an error in the code or the values or the server. It is too unclear about that.
Actually you can know the errors from the java code.This error isn’t used in the actual source code.As i understood from the code.App inventor is going to add the ability to request directions from any directions api using a server url . I found that This error is used there and isn’t used in any place else.That means it won’t appear in your code as it doesn’t belong to openRouteService.So simply ignore it.
That happens if the response code isn’t equal 200 which means that a server error occured.( ! means not )
EDIT = that error also is in the private implementation of requesting directions from a custom api.So it also not belong to OpenRouteService
You can see the private implementation here:
Means it doesn’t use OpenRouteService?
And where did you find this?
That’s what i see.But maybe OpenRouteService have another 4003 error
I saw that in the first lines of code they have defined serviceURL as the api.openrouteservice.org/directions/V2/api/