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

Android Navigation View: Using custom marker image crashes the app. #362

Closed
rhinkle opened this issue Nov 25, 2024 · 2 comments
Closed

Android Navigation View: Using custom marker image crashes the app. #362

rhinkle opened this issue Nov 25, 2024 · 2 comments
Assignees
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rhinkle
Copy link

rhinkle commented Nov 25, 2024

I am looking to set up custom markers for a multi-stop route. I have a custom marker image that I want to use. I have tried to use the following code to set the custom marker image:

      mapViewController.addMarker({
        position: marker.position,
        title: marker.title,
        snippet: marker.snippet,
        visible: true,
        imgPath: 'myMarker.png',
      });

Image asset is located at: android/app/src/main/assets/myMarker.png

However, the app crashes when I try to set the custom marker image. Is there something I am missing? Please help me resolve this issue.


Meta info

  • react-native-navigation version: 0.8.1
  • react native version: 0.74.1
  • Platform: Android
  • Device: Simulator Pixel 7a API 35
@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 25, 2024
@jokerttu
Copy link
Contributor

Hi, in version 0.9.0 both Android and iOS implementation are using assets as resource for imPath.
Marker (and groundOverlay) image handling is not yet perfect and improvements for this are in roadmap.
See how custom marker images are used in example app on version 0.9.0.

PR fixing the issue: #347

0.9.0 version PR:
#353

@jokerttu
Copy link
Contributor

@rhinkle
Closing this issue.
If issue is still valid after upgrading to version 0.9.0, please re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. 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

2 participants