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

fixed iOS google MapView.onMarkerPress not receiving the marker identifier #1741

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

androidseb
Copy link
Contributor

@androidseb androidseb commented Oct 29, 2017

On iOS, if the map provider is 'google', the onMarkerPress callback of the MapView would be called when clicking a marker but the identifier of the marker would not be available.

I noticed that the "onChange" function was successfully being called from native to JS so I mimic-ed the "onChange" function of the MapView everywhere and applied this to the "onMarkerPress" function.

I don't fully understand how the objective-C <=> JS binding works, so this might not be the best way to fix the problem, but it's the cleanest I could think of.

Note: this fix is a workaround to the issue that MapView.Marker.onPress is not being called if the provider is 'google':
#1721

@christopherdro christopherdro merged commit be1b6de into react-native-maps:master Nov 28, 2017
monholm added a commit to monholm/react-native-maps that referenced this pull request Oct 7, 2021
See react-native-maps#1741. I'm not really sure if it fixed
anything back then, or just helped making it easier to access the data
of the nativeEvent.

Either way, this will never be called today, as the consumer-provided
prop will override this, as the consumer props are spread AFTER
this is passed, as opposed to back when the fix was introduced.
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.

2 participants