You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Map zooms to both the info bbox and the route bbox if url contains points #162
triggers a request to the /info endpoint as well as a request to the /route endpoint. These requests result in InfoReceived and RouteRequestSuccess actions, for both of which we update the map bounds in ViewPortStorte#reduce. This means we first fit the map to the info bounds and shortly after fit it to the route bounds (or vice versa). Apparently the /info request is always (?) faster so we first fit the map to the info bounds and eventually zoom to the route bounds as it should be. However, this is rather coincidental. Using OpenLayers (#159) I also ran into the opposite case where we first fit the map to the route bounds, but then end up with the map being zoomed out entirely (fit to the info bounds). Not sure why this never seems to happen in current master, but I was able to reproduce this by adding a small delay for the InfoReceived event.
This could even be related to longer map loading times, because first we 'zoom out' (triggering map tile requests) only to 'zoom in' again just after that.
Btw we had the same issue in #82, but I think this was only partly fixed/hidden so far.
Can we somehow first parse the url so in case some points are given (and a route request will be fired) we can prevent the update of the map bbox that is based on the /info response?
For now we disabled zooming to the info bbox entirely as it is always the entire planet except for local setups, so I'll close here. We can consider zooming to the info box in #117 again.
Activity
easbar commentedon Nov 16, 2021
I think the two requests are triggered here:
graphhopper-maps/src/index.tsx
Lines 57 to 62 in 8331e8e
Can we somehow first parse the url so in case some points are given (and a route request will be fired) we can prevent the update of the map bbox that is based on the /info response?
easbar commentedon Jan 20, 2022
For now we disabled zooming to the info bbox entirely as it is always the entire planet except for local setups, so I'll close here. We can consider zooming to the info box in #117 again.