Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android crash] Fix exception when animating region during initialization #901

Conversation

mlanter
Copy link
Contributor

@mlanter mlanter commented Dec 15, 2016

Fixes a crash cause by calling animateToRegion on the map while it is still be initialized.

To reproduce:
In the componentDidMount of the component that renders the MapView add a this._map.animateToRegion(region, 1500);.

Basically on the native side we haven't initialized the map variable yet (which happens in onMapReady) so if that's the case we can't do an animateToRegion yet.

screenshot-2016-12-15_14 08 08 230

@mlanter
Copy link
Contributor Author

mlanter commented Dec 15, 2016

cc: @spikebrehm

@christopherdro christopherdro merged commit 51d94da into react-native-maps:master Dec 27, 2016
@spikebrehm
Copy link

Released as v0.12.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants