What I'm looking for?
I want to get notified when the user swipes/pans the pan to check other locations. The only only event I could find is onPress but it is only fired when the user actually presses on the map, but if the user swipes the map to change view it doesn't get fired.
What I need it for
I want to know if the user swiped the map and the user's location is not the center of the map anymore. If yes, then show a button to center map around the user's location. Like I said, how do I know if the user swiped.
What am I using Mapbox SDK for react-native (currently only testing on ios but I need it to work on ios and android in the future).
What I have tried so far
onRegionWillChange = { ( ) => this.myfunction() }
myfunction here only gets notified when the region loaded changes, not when the user is not centered anymore.
this._map.getCenter()
I user this to know if thee center of the map is the user's location. But I am looking again for the event that gets fired when the user swipes & then I would call this function to verify the swipe.
Any Help is very much apprechiated