Skip to content

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

Merged
christopherdro merged 1 commit intoreact-native-maps:masterfrom
androidseb:master
Nov 28, 2017
Merged

fixed iOS google MapView.onMarkerPress not receiving the marker identifier#1741
christopherdro merged 1 commit intoreact-native-maps:masterfrom
androidseb:master

Conversation

@androidseb
Copy link
Copy Markdown
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
pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
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