1
import folium
import openrouteservice
client=openrouteservice.Client(key='apikey')
coordinates = [77.09838732369364, 28.50036408080802]
route = client.directions(coordinates=coordinates,profile='driving-car',format='geojson')
ap_directions = folium.Map(location=[28.50036408080802,77.09838732369364],zoom_start=13,tiles="openstreetmap")
folium.GeoJson(route, name='route').add_to(map_directions)
map_directions.save("testing.html")

在可变路线中,'profile' 参数还有哪些其他配置文件(例如自行车或步行)?

4

1 回答 1

0

哦,我使用该help(openrouteservice)方法找到了配置文件。所以是的,这些是其他配置文件 ["driving-car", "driving-hgv", "foot-walking","foot-hiking", "cycling-regular","cycling-road","cycling-mountain","cycling-electric",]

于 2022-01-21T13:57:49.783 回答