onRegionIsChanging is not working on Android.
See original GitHub issueThe onRegionIsChanging event is not working for me in android. I am trying to call onRegionIsChanging to get the heading value but it gets called only when the compass heading is zero. For ios, there is no issue.
<MapboxGL.MapView
onRegionIsChanging={this.onRegionIsChanging}
onRegionDidChange={this.onRegionDidChange}
ref={c => (this._map = c)}
onPress={this.onPress}
style={{ flex: 1 }}
>
<MapboxGL.Camera
zoomLevel={9}
centerCoordinate={[-73.970895, 40.723279]}
/>
</MapboxGL.MapView>
onRegionIsChanging() {
const map = await this._map;
console.log(
"onRegionIsChanging event",
map.state.region.properties.heading
);
}
"@react-native-mapbox-gl/maps": "^7.0.1",
"react-native": "^0.59.9"
I am trying to get heading value from onRegionIsChanging event (event.properties.heading ). Is there a way to get the heading value as the user rotates/moves the chart?
To Reproduce checkout my repo in that I have used the GetZoom example(search for GetZoom.js).It also presents in the mapbox gl example code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
onRegionIsChanging is not working on Android. #323 - GitHub
I am trying to call onRegionIsChanging to get the heading value but it gets called only when the compass heading is zero. For...
Read more >react native - Mapbox - Map loads on iOS but not on Android
Now this map loads on iOS but not on Android. This is the code <MapboxGL.MapView style={editStyles.map} onRegionIsChanging={(features) ...
Read more >rnmapbox/Lobby - Gitter
I'm trying to use rnmapbox/maps library with the latest React Native (0.70.x) and it doesn't seem to work. Is this expected/has anyone been...
Read more >How to use the Mapbox SDK to render custom tiles
first you are going to download/add your tileset into your app, if you download it on runtime I strongly advice for you to...
Read more >mapbox - Bountysource
on iOS it works fine. but in android, the arrow doesn't move when I change the phone ... https://github.com/react-native-mapbox-gl/maps/issues/1420.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kristfal I’m not 100% sure what the difference is. I will make a PR and let folks test it out
Prior the callback would only fire on programmatic events. Now they also fire on user gestures.