Not sure that is a bug or a feature, so before open ans issue on github, i ask here.
When requesting an route with elevation true, the bbox is in 3D: bbox: [lon, lat, ele, lon, lat, ele]
So it isn’t easy to use bbox directly to fit the map to the extend. We need to delete elevation before.
It should be always in 2D bbox: [lon, lat, lon, lat], no?
sorry, that was bullshit anyways… the extent of a map has nothing to do with a geojson bbox, unless the lib would claim to support that. so, yeah, the only way is to remove the z entry.