Repository navigation
Fix bbox not being set on routing result - #52
Conversation
…'s start and end point are identical.
| return pathBbox | ||
| } else if (shouldUseInfoBbox) return infoBbox | ||
| return pathBbox | ||
| return pathBbox || [0, 0, 0, 0] |
There was a problem hiding this comment.
btw: we use this BBox as the "invalid case" here and elsewhere, but strictly speaking this is a perfect valid bbox :)
Still should not make a problem as this bbox is unrealistically small and points to nowhere
There was a problem hiding this comment.
The problem here was that the path coming from the api doesn't have a bbox property for routes with the same start and end point. Mapbox can actually handle the bbox with no area.
The rest of the code relies on the bbox being at least present.
There was a problem hiding this comment.
The problem here was that the path coming from the api doesn't have a bbox property for routes with the same start and end point.
Do you mean we include the bbox in the response of /route and do not include it when two coordinates are identical? Or do you mean with "api" our JS code?
There was a problem hiding this comment.
Oh, indeed. This is a bug I think.
|
The problem is now that it zooms very close to the route even if it is very small and once it is the same points it zooms out to world wide. Instead we should probably define a minimum bbox and additionally ensure that the markers are inside this bbox. |
…blem-identical-points Fix bbox not being set on routing result
fixes #36