googlemaps / react-native-navigation-sdk

React Native library (Beta) for bringing Google Navigation SDK to Android and iOS apps using React.
https://www.npmjs.com/package/@googlemaps/react-native-navigation-sdk
Apache License 2.0
31 stars 7 forks source link

fix!: create bitmapdescriptor from asset on android #347

Closed jokerttu closed 2 days ago

jokerttu commented 3 days ago

On android BitmapDescriptorFactory.fromPath was used to load bitmap image for markers and groundoverlays, but this is ment to be used only with absolute paths to images. And iOS impelementation uses named assets as well, this PR changes android to use assets as well.

In future there most likely will be need for better control to support custom images, like from url, or given as bytearray. This PR will fix existing behaviour so that it can be used with custom asset images.

Example app is updated have exampe how to add custom asset images to the project.

Fixes #346 Fixes #154