Skip to content

Current Location and move to current location button not viisble with new architecture. #5607

@Kartik-tripathi-techtree

Description

Summary

When I land on the screen the location marker and move to current location button is not visible . But as soon as I move to background and come back both are shown .

Reproducible sample code

<MapView
          zoomEnabled={true}
          showsUserLocation={true}
          showsCompass={false}
          showsMyLocationButton={true}
          provider="google"
          googleRenderer='LATEST'
          userInterfaceStyle='light'
          style={{flex: storeList.length !== 0 ? 1 : 0}}
          initialRegion={{
            latitude: deviceLat,
            longitude: deviceLong,
            latitudeDelta: 0.2,
            longitudeDelta: 0.2,
          }}
          >
          {storeList.map((store: Store, index) => (
            <Marker
              image={require('../../rcasset/Stores/map_marker_icon/map_marker_icon.png')}
              coordinate={{
                latitude: Number(store?.latitude),
                longitude: Number(store?.longitude),
              }}
              onPress={() => {
                if(isLoading)
                  return;
                setSelectedindex(index);
                setShowStoreDetails(true);
              }}
            />
          ))}
        </MapView>

Steps to reproduce

  1. Land on the screen
  2. Not able to see the current location icon and button
    3.Put app in background and come back
    4.Able to see both icon and button.

Expected result

As soon as I land on screen and draw the map my current location should be shown.

Actual result

I am not able to see the my current location icon when I am moving in app .

React Native Maps Version

1.24.3

What platforms are you seeing the problem on?

Android

React Native Version

0.78.2

What version of Expo are you using?

Not using Expo

Device(s)

Xioami Note 10S

Additional information

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions