Closed Jaydipsinhv closed 5 years ago
We're running into this as well - very random - just started happening.
@Jaydipsinhv - if there is anything wrong on android with any of the layers events will falter. So for use, in android production, we hadn't set tileSize={256} on a RasterSource. While it didn't cause a hard crash, it broke everything else relatively silently. I'd suggest removing things until you get to a working state then re-adding and debugging from there.
Also there was a known bug where certain event listeners break in dev mode when you reload the app so you maybe running into that as well.
@dorthwein - Thanks - I know about known bug for event not working on emulators for both Android and iOS. Problem i faced during release build. In Android its perfectly working fine as expected. It only cause problem with iOS device.
Basically this event is very important for getting radius based operations on map. So i really need solution or any patch code for getting region change event.
I created an issue for this #1391
https://github.com/mapbox/react-native-mapbox-gl/commit/8bfa736f5a3350c59e96b778f8e54391262fabd0 This may be the commit creating this bug
I was on mapbox@6.1.2
and react-native@0.57.1
and faced the issue of not having events firing on only Android
.
Once I updated to mapbox@6.1.3
the events started working. I checked the commits, it seem like they fixed it in the latest version.
I was on mapbox@6.1.2
and react-native@0.57.0
and faced the issue of not having events firing on only Android
. mapbox@6.1.3
did not fix the issue. Reverting back to mapbox@6.1.1
worked.
For me it was reloading the app as @dorthwein said!
@nitaliano it's not an issue. Maybe they hot relaod their app.
It is an issue however it resolves itself in production and the first time you load the app after compiling. (Android)
The second time you reload the app it does not work.
This is fixed in master.
I seem to be hitting this issue again even on master. 6.1.1 is fine but anything above that (even master) do not) fire the events.
Using RN version 0.59.4
I am using this lib's version 8.1.0-rc.2 and RN version 0.62.2, and also noticing that the onRegionDidChange
does not seem to always fire. If I continously move the map around (swiping the map a few times), it does not always fire.
Problem
I have added onRegionDidChange property on MapboxGL.MapView. So when I change pan on may and zoom In/Out on map this method is called. Its perfectly working fine with Android device but somehow its not working with iOS devices.
Regarding versions i used for react-native app is mension below
@mapbox/react-native-mapbox-gl: 6.1.2
react-native: 0.55.4
I have also tried with @mapbox/react-native-mapbox-gl: 6.1.3 npm version for mapbox module but still faced same problem.
I want to get visiblebound on change region of map for getting longest distance between two coordinates.
So if anyone is faced this problem then please provide help to go ahead