0

I want to know if Google maps, Open Streetmap, or some alternative, lets me plan a route by foot (or bicycle, maybe also car, or even public transportation, but by foot is my initial project) from point A to point B …

BUT… it should be able to offer a detour if certain points of interest are “nearby”, where I get to define “nearby”, whether in terms of distance or time added, and I can choose from the API's POIs, or define my own list.

2
  • 1
    Have a look at a similar thing I did: graphhopper.com/blog/2015/05/05/…
    – Karussell
    Commented Jul 20, 2016 at 7:27
  • That looks like just what I want, and it is a bonus that you put the source code on GitHub. From what you write, I may have to pay if I make heavy use of the GraphHopper Matrix API, but that its acceptable (aha! You are co-founder? Well, that’s good, know I know who to ask questions to). Please post this as an answer.
    – Mawg
    Commented Jul 20, 2016 at 14:24

1 Answer 1

2

As suggested in the comments: there is a simple solution via fetching the POIs calculating the detours and picking the best route in the end like I did with similar requirements here.

Another option would be to attach the POI information directly in the graph, and do the graph search (Dijkstra or A*) until you find a set of suitable ones, then calculate the routes from them to the destination. This is more complex but avoids knowing the specific POIs up-front.

1
  • It is highly likely that I will have to add my own POI list
    – Mawg
    Commented Jul 21, 2016 at 9:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.