-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
After updating from 0.28.0 to 1.3.2, map doesn't re-center around new coordinates, only on Android #4593
Comments
Some progress? Im trying to fix this problem since yesterday and updated my rn since was older than the specified (0.64.3) but the problem persist. My app is rerendiring and the marker as well, but the zoom is going into the ocean. |
@Fersy1998 Not yet, will post here if I discover anything. |
Hi @gabriellend, I can't find any Such a big upgrade |
@polygbrl Thank you for your response! You are 100% right, my mistake |
So @gabriellend, |
@polygbrl I kind of forgot a big thing that I mentioned in my original post – it's working fine on iOS. It seems to me if that's the case, it's probably not something to do with my code. Do you agree, or think your comments may still apply and I might have to do something along the lines of |
@gabriellend I agree there shouldn't be any difference between iOS and Android, so equivalently, I'd consider there shouldn't be any difference in your method calling I just tried the While double checking your video, I can see that the I'm sorry that I insist you double check your code but I don't have much to look into and therefore might also be wrong on how you handle your logic. |
@polygbrl No worries, I totally appreciate you taking the time to help me! I'll will definitely look into it, might take me a week as I'm also working on some other things. Thanks for your help! |
@polygbrl and anyone else that stumbles on this. I fixed the zoom issue by adding a call to |
I've updated from version 0.31.1 to 1.4.0, all good on IOS but on Android the markers keep flickering and the map is overall very slow to render or when the user tries to interact with it. At the moment I've removed the new google maps Renderer and everything works fine, will take a closer look when/if I have the chance but if someone needs a "quick" fix this might help or point in the right direction - not sure this is the best solution and probably it's not on the long run here are the [docs] about it(https://github.com/react-native-maps/react-native-maps/blob/master/docs/installation.md#using-the-new-google-maps-renderer) section here are some known behavioural changes Github |
Summary
Not sure this is a bug but thought there was enough information that it might be.
I've been using version 0.28.0 for years and it works great. After updating to 1.3.2, when you give the map a new location, it doesn't re-center around the new coordinates until you interact with the UI (refer to the videos below to see what I mean).
I didn't see any changes to core functionality in the docs/readme and, as it works as expected on iOS, I'm hesitant to change anything in my code. While trying to debug I noticed that when you change the coordinates,
onMapLayout
is not called again. That was the only difference I could find between the old coordinates and new. But the same thing happens with version 0.28.0 so not really sure that matters.fitToCoordinates
is called inonMapLayout
and when you input a new location.Reproducible sample code
Steps to reproduce
The only thing that might be possible is using the test app. See if different coordinates cause the map to re-center with 0.28.0, then upgrade to 1.3.2 and try the same thing.
Expected result
Here you can see I start with the user in Hawaii and the different points to choose from on the East Coast and the map is zoomed out to accommodate everything. When I change the user to where the points are, the map correctly zooms in.
Working-0.28.0.mp4
Actual result
Here you can see I start with the user in Hawaii and the different points to choose from on the East Coast and the map is zoomed out to accommodate everything. When I change the user to where the points are, you can see that the user's location has indeed changed but the map stays zoomed out, as if it thinks the user is still in Hawaii, until I click on one of the cards representing one of the points.
Not.working-1.3.2.mp4
React Native Maps Version
1.3.2
What platforms are you seeing the problem on?
Android, iOS (Google Maps)
React Native Version
0.67.4
What version of Expo are you using?
Not using Expo
Device(s)
Android physical devices and emulators
Additional information
Side notes, you can also see the markers flashing a bit in version 1.3.2, the font for the word "Widener" is suddenly very bold, and the app started constantly refreshing as well. Any insight on why these might've changed is appreciated too. Thank you!
The text was updated successfully, but these errors were encountered: