React-native-mapbox-gl: Add fitBounds?

Created on 7 Sep 2017  路  9Comments  路  Source: nitaliano/react-native-mapbox-gl

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 :)

Most helpful comment

I've added support for this in the v6 branch.

All 9 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VentsislavDinev picture VentsislavDinev  路  3Comments

lernerbot picture lernerbot  路  3Comments

Craytor picture Craytor  路  3Comments

lucasbento picture lucasbento  路  3Comments

glennverschooren picture glennverschooren  路  4Comments