Would it be possible to add fitBounds like in this Mapbox example: https://www.mapbox.com/mapbox-gl-js/example/zoomto-linestring/
With this function it would be easy to fit for example two annotations to the screen :)
I've added support for this in the v6 branch.
What is the estimate for v6? :D
Or even better could it be added to v5 meanwhile you are doing v6? @nitaliano
If a PR gets sent in for fitBounds I'll be happy to merge it in. The problem with the current codebase is most method calls won't work with componentDidMount and I suspect fitBounds will have that problem.
Timeline wise it could potentially be two months(guesstimate!) of time. We will be releasing alpha and beta versions as we go along, so it could really depend on what features you use in your projects.
Will V6 have the componentDidMount problem?
It will not have that problem
What the hell? xD I started doing PR for fitBounds but then I noticed that there is function called setVisibleCoordinateBounds which I can use for this use case! Only bad thing about it is that there is like 10 parameters lol. I might do PR for this.
@nitaliano I made #626
Closing this out
Most helpful comment
I've added support for this in the
v6branch.