GabrielCampelo
GabrielCampelo

Reputation: 1

Why the callout is not above the AnimatedMarker ? (React Native Maps)

I don't know why the callout is having this behavior, my theory is because of the AnimatedMarker. The callout is not lock above the marker.

return <MarkerAnimated
        ref={(el) => (marker.current = el)}
        anchor={{ x: 0.5, y: 0.5 }}
        rotation={rootBus}
        coordinate={{
          latitude: newCoordsBus.latitude,
          longitude: newCoordsBus.longitude,
        }}
        image={carIcon}
        flat={true}
        onPress={() => {
          setModal(true);
          setTabStyle(false);
          setModalInfoBus(bus);
        }}
      >
        <Callout tooltip>
          <View
            style={{
              marginBottom: 10,
              marginVertical: 12,
              backgroundColor: `#${bus.backgroundColor}`,
              paddingVertical: 4,
              paddingHorizontal: 8,
              borderRadius: 12,
            }}
          >
            <Text style={{ color: `#${bus.textColor}`, fontWeight: "bold" }}>
              {bus.linha}
            </Text>
          </View>
        </Callout>
      </MarkerAnimated>
    </>

(https://i.sstatic.net/Pi5il.jpg)

I hope someone knows how to solve this problem

Upvotes: 0

Views: 23

Answers (0)

Related Questions