Closed anyamiletic closed 2 years ago
Hi @anyamiletic ,
There is an example related to this issue in our React Native Map document. We are using TouchableHighlight component to trigger custom info window click events. You can check the sample code.
Thank you for your interest.
Description When implementing a custom info window using
HMSInfoWindow
, theonInfoWindowClick
andonInfoWindowLongClick
events are not firing. TheonInfoWindowClose
event does fire as expected.Expected behavior The click events fire on click
Current behavior The events only fire on the default Info Window, or, if using a custom
HMSInfoWindow
, when there are only Text elements as children. As soon as a View is used (like in the official react-native example) this listeners never fire.Screenshots official example modified to show callback logs:
Environment
Other You can reproduce this bug by using the official example project at https://github.com/HMS-Core/hms-react-native-plugin/tree/a796c2550e0c7a0f44c598056b427a58ac5abd47/react-native-hms-map/example In
screens/Markers.js
add info window callbacks to each marker, or even just to the marker rendering the custom info window: