Open azarz opened 1 year ago
Hello @azarz, I like this idea. I prefer the second option and I would add a version. Something like {baseRoadUrl}/osrm/{osrmVersion}/driving/...
. Is that possible with your framework ?
And how could we handle resources ?
Yes this is possible, the plugin only needs the url before /driving
for OSRM and before /isochrone
for Valhalla, so it doesn't matter what's before those.
For the same reason, the resource should be before those parts of the urls, maybe something like :
{baseRoad2Url}/osrm/{osrmVersion}/{resource}/driving/13.388860,52.517037;13.385983,52.496891?steps=true
and
{baseRoad2Url}/valhalla/{resource}/isochrone?json={"locations":[{"lat":-1.0825252603106321,"lon":35.47230915879868}],"costing":"pedestrian","contours":[{"time":10,"color":"0000ff"}],"polygons":true}
Perfect ! Let's do it !
Ok for OSRM. TODO for valhalla.
Feature
Expose native OSRM and Valhalla APIs
Is your feature request related to a problem? Please describe.
I would like to develop a web-based application using the maplibre-gl framework, and use the IGN routing APIs. The routing plugins available use native OSRM and Valhalla APIs to work, and I'd want to use them out of the box (https://github.com/maplibre/maplibre-gl-directions and https://github.com/watergis/mapbox-gl-valhalla)
Describe the solution you'd like
I'd like to be able to use the native APIs of OSRM and Valhalla on a road2 service (specifically, the one served by IGN). For example :
{baseRoad2Url}/simple/1.0.0/osrm/driving/13.388860,52.517037;13.385983,52.496891?steps=true
valhalla :
{baseRoad2Url}/simple/1.0.0/valhalla/isochrone?json={"locations":[{"lat":-1.0825252603106321,"lon":35.47230915879868}],"costing":"pedestrian","contours":[{"time":10,"color":"0000ff"}],"polygons":true}
Other suggestion :
{baseRoad2Url}/osrm/driving/13.388860,52.517037;13.385983,52.496891?steps=true
{baseRoad2Url}/valhalla/isochrone?json={"locations":[{"lat":-1.0825252603106321,"lon":35.47230915879868}],"costing":"pedestrian","contours":[{"time":10,"color":"0000ff"}],"polygons":true}
Tasks