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

NavigationMap - Android: When there is a route with many destinations and each destination has a marker on the map, the first marker will not fire the onMarkerClick event. #325

Open
rhinkle opened this issue Nov 1, 2024 · 4 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rhinkle
Copy link

rhinkle commented Nov 1, 2024

Description

When there is a route with many destinations and each destination has a marker on the map, the first marker will not fire the onMarkerClick event.

Environment details

Library version and other environment information:

  • react-native-navigation-sdk version: 0.6.1

OS type and version

  • iOS: 18.1, 18.0
  • Android: 35

Steps to reproduce

  1. Pull down this branch.
  2. Install the dependencies.
  3. Run yarn start
  4. Run yarn ios or yarn android
  5. Click on navigate button
  6. When the map, route and markers are load click on each of the markers. You should see a log in the console firing onMarkerClick. On iOS this works as expected and the onMarkerClick will fire.
  7. On Android, click on the first marker or marker.id of "m0" and the onMarkerClick will not fire, however all the other markers will fire the onMarkerClick.

Code example

Link to Code example

Images / Media

Screenshot 2024-11-01 at 3 45 47 PM

@rhinkle rhinkle added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 1, 2024
@jokerttu jokerttu added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed triage me I really want to be triaged. labels Nov 4, 2024
@jokerttu
Copy link
Contributor

jokerttu commented Nov 4, 2024

Thanks for reporting this issue!

@rhinkle
Copy link
Author

rhinkle commented Nov 4, 2024

I was able to trigger the m0 marker for Android clicking around/within the gray dot.

marker-clickable-region

@caio1985
Copy link
Contributor

@jokerttu Can you please take a look?

@jokerttu
Copy link
Contributor

Hi,
I was able to reproduce this issue,

The problem is that when marker that is over the currently active route leg is clicked, the event is captured by the SDK (for route leg click handling) and is not propagated to the marker click listener.

As this package is just a wrapper for Navigation SDK for Android and iOS platforms, only features available on the SDK can and should be implemented to the plugin itself.

I will continue investigating if there is possiblity to control how route click events are handled, but this might not be possible with current Navigation SDK version for Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants