-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
ShapeSource onpress call 2 times #97
Comments
Does it only happen when clustering is enabled? |
I've also noticed that the onPress in UserLocation calls twice with each press. |
It is being called twice as for me on Android only for MapView onPress. I am on 7.0.0-rc-2 |
We came under the same problem. I pinned it down to duplicate events being dispatched once by the ShapeSource and once by the UIManager. This patch fixes it but I've haven't had time yet to check if it creates any other side effects.
|
Looks like to me it's a result of merge error: One change react-native-mapbox-gl/maps@7458dd1#diff-67b563fd89b6669ee1bc084451e62e57R41 other was from expression changes: I guess the first change should win, so we should keep |
Yeah that looks like what's happened. I'll get it into a PR later today. edit: actually after some testing it looks like the |
Great. I’ll tag a new release once this is in.
…On Thu, 13 Jun 2019 at 10:32, merrick kirby ***@***.***> wrote:
Yeah that looks like what's happened. I'll get it into a PR later today.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/react-native-mapbox-gl/maps/issues/97?email_source=notifications&email_token=ABLAPW4JR7FVDKO2Z4FED6DP2IA25A5CNFSM4HVORQ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXS6MCI#issuecomment-501605897>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABLAPWZ5A76CFNEURW45IJDP2IA25ANCNFSM4HVORQ6A>
.
|
I've implemented the fix in #137. Let me know if you're seeing double events/missing events now. |
All - Thanks for working a solution to this one and actively maintaining this repo! We are holding off on releasing our Android app until we work this fix in. When might we expect the new release to be tagged and up on npm? |
Apologies for not submitting a fix, after removing the |
@makirby is this in production env, or only in development mode after a reload of the JS side? |
I could still get it to happen in production, albeit more intermittently. |
@mfazekas yeah that looks like the cause |
@mfazekas Thanks for pointing it out. Yes it was caused by the same problem, just added a commit to the PR that fixes the problem for these map related events. |
Hmmm I'm trying to get a Some important packages I'm using: "@react-native-mapbox-gl/maps": "^7.0.4",
"react": "^16.9.0",
"react-native": "^0.60.5", Platfrom: [Android] I've been using very similar code to this example but including I am not getting any errors or anything, and no console log messages either. Is anyone else running into a similar issue with the above packages? |
Describe the bug
The onpress function of ShapeSource is called 2 times
To Reproduce
Screenshots
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: