[Bug]: v11 LocationPuck topImage/bearingImage crashes with Buffer not large enough for pixels
#3743
Labels
bug 🪲
Something isn't working
Mapbox Implementation
Mapbox
Mapbox Version
11.0.0
React Native Version
0.76.5
Platform
Android
@rnmapbox/maps
version10.1.33
Standalone component to reproduce
Observed behavior and steps to reproduce
⚠ Issue DOES NOT HAPPEN when using
v10
.Contextual information
const headingArrow = require("@assets/images/arrow.png");
, but the linter closed the issue because of the require so I had to change it to import.Steps to reproduce
RNMapboxMapsVersion: "11.0.0"
andlocationWhenInUsePermission: "Show current location on map."
in app.config.ts.<Mapbox.Images images={{ someImage: someIcon }} />
as the first child of MapView.LocationPuck
component, use either topImage or bearingImage with the defined image string, so with the previous point taken into account:topImage="someImage"
orbearingImage="someImage"
.Observed behavior
One thing I noticed is that it can work for a brief amount of time before the next rerender with the following scenario:
LocationPuck
component in the screen WITHOUTtopImage
orbearingImage
in the MapView screen.topImage
orbearingImage
toLocationPuck
.So if you render the component at first without the
topImage
orbearingImage
and then you addtopImage
orbearingImage
, it will work until theMapView
or screen is rerendered. However, if you add it right away before going to the screen with theMapView
, you will get the error straight away.Things I tried
-
<Mapbox.Images images={{ headingArrow: require("@assets/images/arrow.png") }} />
.-
<Mapbox.Images images={{ headingArrow: require("../../assets/images/arrow.png") }} />
.-
<Mapbox.Images images={{ headingArrow: "https://cdn-icons-png.flaticon.com/128/879/879658.png" }} />
.-
<Mapbox.Images images={{ headingArrow: headingIcon }} />
(headingIcon
being defined in a const before the return).v10
and it works perfectly fine.48x48
,64x64
,72x72
,96x96
,100x100
and512x512
.Error
Screenshots
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: