虽然链接here显示Herepy库支持hereapi的自行车路由,但我无法让它工作(而汽车路由工作得很好)。你知道吗
运行时:
import herepy
#https://herepy.readthedocs.io/en/latest/herepy.html
lat1,lng1 = 45.575402, -73.209555
lat2,lng2 = 45.595625, -73.619487
routingApi = herepy.RoutingApi('a key', 'another key')
byCar = routingApi.car_route([lat1,lng1],[lat2,lng2],[herepy.RouteMode.car, herepy.RouteMode.fastest])
byBike = routingApi.bicycle_route([lat1,lng1],[lat2,lng2])
我得到:
AttributeError: 'RoutingApi' object has no attribute 'bicycle_route'
是bicycle\u route()函数没有正确实现,还是我在这里做错了什么?你知道吗
看起来这个函数was just added recently,请尝试从源代码安装最新版本,即:
python setup.py install
相关问题 更多 >
编程相关推荐