Map marker icon double the size when built

Hello, I hope this is the right section to put this in, I’m new :slight_smile:

Anyway I have this marker:

  coordinate={{ latitude: item.latitude, longitude: item.longitude }}

Which when I run the app in Expo, either on my phone or through the emulator, the map icons look perfect. But as soon as I build the app and install it and run it, the marker size is more or less double the size. How can this be?

I should clarify I’m using SDK 43 with a managed workflow.

Hi @binaryvigilante

Please have a look through the following forum posts/issues:

1 Like

Sorry I should have clarified, my issue is on Android, all those linked issues are for iOS.

I have solved it. For anyone else having this issue, I had to detect what device the user is using. So iOS or Android. Apparently iOS and Android act differently. My new code:

    key={ }
    coordinate={{ latitude: item.latitude, longitude: item.longitude }}

     // Here we call isAndroid to check if the user is using iOS or Android. If they are using iOS, require the markerPin. If they are using Android, set it to null.
    image={isAndroid ? markerPin : null}
    {/* Here we check if isAndroid variable returns false. If it does, the person ISN'T using iOS and we display the Image Prop. */}
    {!isAndroid && <Image source={markerPin} style={{ width: 30, height: 50 }} />}

    <Callout tooltip onPress={() =>console.log("I was pressed.")}>

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