Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still using legacy after enableLatestRenderer #4986

Closed
meedodk opened this issue Feb 26, 2024 · 2 comments
Closed

Still using legacy after enableLatestRenderer #4986

meedodk opened this issue Feb 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@meedodk
Copy link

meedodk commented Feb 26, 2024

Summary

In my App.tsx i run

enableLatestRenderer();

But i still get 'LEGACY' returned in the Android. My simulator

I do not use any other Services that use a lower version of Google Maps.

if (Platform.OS === 'ios') { enableLatestRenderer(); } else { enableLatestRenderer().then(res => console.log(res)); }

I also tried including specific implementations with successful build:

implementation("com.google.android.gms:play-services-maps:18.2.0") implementation("com.google.android.gms:play-services-location:21.1.0")

I do not know if this is a bug or if I am doing something wrong in my setup. I followed the steps on the Installation guide.

Hope someone can help me fix this issue.
Thanks in advance.

Reproducible sample code

<MapView
        provider={PROVIDER_GOOGLE}
        style={[styles.map]}
        ref={mapRef}
        onPress={onMapClick}
        customMapStyle={mapStyles}
        showsUserLocation
        showsMyLocationButton={false}
        showsCompass={false}
        initialRegion={location}
        onRegionChange={handleOnRegionChange}
        onRegionChangeComplete={handleOnRegionComplete}>
        {children}
      </MapView>

Steps to reproduce

if (Platform.OS === 'ios') { enableLatestRenderer(); } else { enableLatestRenderer().then(res => console.log(res)); }

Expected result

that the promise return 'LATEST'

Actual result

promise returns 'LEGACY'

React Native Maps Version

^1.10.3

What platforms are you seeing the problem on?

Android, iOS (Google Maps)

React Native Version

0.72.7

What version of Expo are you using?

Not using Expo

Device(s)

Android 13.0 ("Tiramisu" Api level 33

Additional information

No response

@meedodk meedodk added the bug Something isn't working label Feb 26, 2024
@gijsjager
Copy link

gijsjager commented Feb 28, 2024

I got the same issue (but using Expo SDK 50), after updating the Google Play Service in my android emulator it suddenly got changed to "LATEST"

Maybe this could help?

Updating Google Play Service:

  • In the emulator press the 3 dots on the side of the emulator
  • Choose Google Play
  • Press the button [Update]

@mateki0
Copy link
Collaborator

mateki0 commented Mar 3, 2024

Thanks for this solution @gijsjager. On my phone and emulators it all works fine so renderer is always "LATEST" but this may be helpful with old issue with black streets on emulators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants