2

Basically the Callout component is always being cut does not matter what I put inside of it.

Example: Printscreen of the problem

The code:

<MapView
        ref={mapRef}
        style={{
          width: 300,
          height: 400,
        }}
        zoomControlEnabled
        showsUserLocation
        showsMyLocationButton
        showsBuildings={false}
        showsIndoors={false}
        showsPointsOfInterest={false}
        loadingEnabled>
        <Marker
          coordinate={{
            latitude: -20.213090469552533,
            longitude: -40.266256965125116,
          }}
          pinColor={'red'}>
          <Callout>
            <View style={{padding: 10}}>
              <Text style={{color: 'black'}}>Olá</Text>
            </View>
          </Callout>
        </Marker>
      </MapView>

I was expecting to at least show some text inside of it but nothing worked so far.

2
  • Could you please check this if it's helpful? Commented Nov 6, 2024 at 3:54
  • Are there any updates on this? I am experiencing the same issue Commented Nov 26, 2024 at 20:24

2 Answers 2

0

This happens due to the React Native New Architecture. please refer the React Native Docs https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here

to figure this out without downgrading the react-native version, you can just disable the React Native New Architecture,

Locate your Android/gradle.properties

change newArchEnabled=false

And make sure to rebuild the gradle file after the change

Sign up to request clarification or add additional context in comments.

Comments

0

Try adding title and description props to the <Marker /> component like this:

<Marker
  coordinate={{
    latitude: -20.213090469552533,
    longitude: -40.266256965125116,
  }}
  pinColor="red"
  title="Test title"
  description="Test description"
>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.