OpenRouteService Road Navigation Extension

Attached Test AIA File To clear any designing doubts…

It is a very good extension.

Can you give the meanings of error numbers?

1 Like

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 4003 or 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:

1 Like

I have checked and confirmed that Navigation Extension Works With Google Maps Without Any Errors…
:partying_face: :partying_face: :partying_face:

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.


thanks again

1 Like

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:


This is what can be found in the App Inventor code :grin: thought i found it :grin:


Ohh… :astonished:

These are app inventor specific errors :sweat_smile:.

I disturbed the open route service staff for that and they too got confused with the error codes. :sweat_smile:

Don’t Tell Them!! :shushing_face: :shushing_face: :wink:


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_UNABLE_TO_REQUEST_DIRECTIONS,
ERROR_ROUTING_SERVICE_ERROR = 4003; are not understood by its name.

I mean 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.

1 Like

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 :shushing_face:. 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. :sweat_smile:

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:

1 Like

Means it doesn’t use OpenRouteService?
And where did you find this?

1 Like

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