Skip to content

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

Description

@rhinkle

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

Activity

  1. added
    triage meI really want to be triaged.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Nov 1, 2024
  2. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    triage meI really want to be triaged.
    on Nov 4, 2024
  3. jokerttu commented on Nov 4, 2024

    @jokerttu
    Contributor

    Thanks for reporting this issue!

  4. rhinkle commented on Nov 4, 2024

    @rhinkle
    Author

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

    marker-clickable-region

  5. caio1985 commented on Nov 26, 2024

    @caio1985
    Member

    @jokerttu Can you please take a look?

  6. jokerttu commented on Nov 28, 2024

    @jokerttu
    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

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions