Documentation on url parameters for on maps.openrouteservice.org

Hello,

I’ve just discovered your project and really love what I’ve seen and want to start using it.

I’d like to try using it to generate a pre-populated route with multiple waypoints that would display at openrouteservice so that users could either use the route, or add/remove/reorder waypoints as they desire.

If I manually create a route a url is generated such as:

https://maps.openrouteservice.org/directions?n1=53.382398&n2=-2.94718&n3=15&a=53.390434,-2.938589,53.374455,-2.948369,53.380999,-2.943914&b=0&c=0&k1=en-US&k2=km

However, I don’t understand the different parameters in the url i.e what the n1, n2, n3, a, b, c k1 and k2.

Is there anywhere that these parameters and the url schema are documented so that I can work out how to manually create the url?

Hi @linucks,

you can have a look into the source code: https://github.com/GIScience/openrouteservice-app/blob/master/app/constants/lists.js#L583-L618

once you know what each letter stands for, try experimenting a bit with the settings and you should be able to figure out, what values you need to use.
There is no official “documentation” for this as the purpose was to easily share route settings of routes you already created.

Please note that we currently work on a new client as well: openrouteservice.org/map
Ah, but i just realized that we decicded to ditch the key-value approach in favor of a data object.
So for your purpose you might find the classic client better suited.

Best regards

Hi @amandus,

Thank you for that - just what I needed.

I’ve got it working and it looks like I only need a list of lat/longs pairs to the the “a” argument - the n1 and n2 arguments aren’t required. Is n1 and n2 the latitude and longitude of the map centre or something else?

Yes, n1-3 are solely related to the map view. If you are using the url to produce a route, you don’t even need to specify them. They will be overwritten once the map zoomes to the whole route extent.

Great - thank you for your help.