Bounds (bbox) include elevation when elevation is true

Not sure that is a bug or a feature, so before open ans issue on github, i ask here. :wink:

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?

It’s a spec :wink:

https://tools.ietf.org/html/rfc7946#section-5

I recommend a PR to your geo lib, if it doesn’t support that (yet).

1 Like

@nils OK.

I’m using Leaflet, so it should works with… I’ll retry.

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.