Hi I'm trying develop an application for android using OpenStreetMap/MapQuest. is it possible to manipulate the routing feature in order to avoid certain streets while drawing the path to destination, with these streets defined using map markers? if so do you know any tutorial or sample code that could give me an idea in order to do implement this on the map, thanks in advance.
Asked
Active
Viewed 394 times
1 Answers
0
According to this list of online routers for OSM there are only two routers which allow to specify areas to avoid: brouter and OpenRouteService.

scai
- 20,297
- 4
- 56
- 72
-
1With GraphHopper that is easy to implement too and was already done by GraphHopper users :) – Karussell Feb 17 '15 at 20:37
-
@Karussell do you have any samples using GraphHopper? just so I can understand how its going to work. – Christopher Hernandez Feb 18 '15 at 06:30
-
1You will need to disable CH and create a custom weighting https://github.com/graphhopper/graphhopper/blob/master/docs/core/weighting.md where you return e.g. an infinity weight for a certain bounding box: bbox.contains(lat, lon). You get lat,lon via graph.getLat/getLon or via edgeState.fetchGeometry(0) (a bit slower) – Karussell Feb 18 '15 at 10:51