[英]Graphhopper Route for Pedestrian android
How do i set route type to Pedestrian in Graphhopper android? 如何在Graphhopper android中将路径类型设置为Pedestrian? I have been using GHRequest.setVehicle() method in android, and it does not work.
我一直在android中使用GHRequest.setVehicle()方法,但它不起作用。 I have tried using "foot", and "bike".
我尝试过使用“脚”和“自行车”。 None worked.
没有用。 Also, it doesn't work when i changed Algorithms too.
此外,当我改变算法时它也不起作用。 Only Dijkstra_BI is working now.
只有Dijkstra_BI现在正在工作。
GHRequest req = new GHRequest(fromLat, fromLon, toLat, toLon).
setAlgorithm(Algorithms.DIJKSTRA_BI).setVehicle("foot");
Thanks in Advance. 提前致谢。
The map data that i have contain following files. 我包含以下文件的地图数据。
I am getting the following error when I used 我使用时收到以下错误
tmpHopp.setEncodingManager(new EncodingManager("foot"));
I have solved this problem thanks to karussell. 我已经通过karussell解决了这个问题。 I will write what i did for the people like me who might face this same problem.
我会写出我为像我这样可能面临同样问题的人所做的事情。
What I did
我做了什么
In the graphhopper folder cloned from git, there is a file called config.properties .
在从git克隆的graphhopper文件夹中,有一个名为config.properties的文件。 In the 5th line.
在第5行。 change it to
graph.flag_encoders=car,foot,bike
将其更改为graph.flag_encoders =汽车,脚,自行车
Thanks. 谢谢。
当您导入数据时(在桌面/服务器上),您必须通过graph.flag_encoders=bike,foot,...
在config.properties或旧版本中指定您需要的车辆graph.flagEncoders=bike,foot,...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.