Route planner with dynamic data

I would like to build a route planner application. I have several fixed locations for public elevators. Each elevator can be operational or broken and would like to plan my route accordingly. If it is broken, an alternative route would be calculated.

Is something like this possible?


Hi @Ivan_Arakistain,

yes, something like that is possible.

However, not easily and it would also need customization on the openrouteservice backend.
I don’t think elevators are currently considered in normal pedestrian routing.

If it is only for e.g. one town the graphs could be rebuild after the state of an elevator changes to update the route planning.
For a global instance you would need a different approach, e.g. passing the id of broken elevators with the routing request and let the backend use that to identify the edge in the graph and block it.

You would have to develop and that in your own ors instance though, so it’s not possible with our official API.

Best regards

Ok, I understand. The use case is for one town and there are like 8 elevators.

To start with, how could I just represent over the map if each elevator is operational o nor?

That depends on your data format and your frontend framework.
If the data is in GeoJSON format it’s rather easy to add in both leaflet and openlayers.
If you use vuejs, angular or react, there are always wrappers for leaflet and OL to make the usage easier.
But you will have to take a closer look at the documentation of the thing you are using for details on how to add stuff to the map.

Best regards


just an afterthought:
If you have the elevator position specifially, you might be able to work with avoid_polygons to mark your elevators as functioning/non-functioning - a small square around the elevator might do the trick.

I’m not sure whether ors uses elevators, but I think it does - at least this example routes from a path w/o a level to a path w/ level 1 - and in fact, it’s just one long elevator.

Best regards