SDK 25: Custom map-markers are now HUGE on iOS

#1

I’m currently on a branch, upgrading our app from SDK 24 to SDK 25 and the first thing that pops, is that our map icons are extremely large.

We are using icon.png (48 px wide), icon@2x.png (96 px wide), icon@3x.png (144 px wide) as instructed by the React Native documentation and the markers are declared like this:

const Marker = ({coordinates}) => (
  <MapView.Marker coordinates={coordinates} image={require('./icon.png')} />
)

Screenshot SDK 25

Screenshot SDK 24

This does not seem to affect the Android devices I’ve tested on.

0 Likes

Asset.loadAsync image density issue
#2

Thanks for reporting this. Do you think this is the same issue?

Is there any chance you could post a Snack with code, or a github repo, that could reproduce the problem?
That would help us fix it.

Sorry for the trouble.

0 Likes

#6

Found it!

Image.prefetch() is causing this. We do a prefetch of critical assets during app startup and if I comment out this particular image. It works fine… but as soon as I uncomment, it goes huge again.

My code looks almost identical to this: https://docs.expo.io/versions/latest/guides/preloading-and-caching-assets.html#content

I’m not sure where to report a bug like that.

1 Like

#7

Oh wow, weird. thanks for sharing that information.

0 Likes

closed #8

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

0 Likes