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
Map screen getting freeze when user try to zoom out less then minZoomLevel #4961
Comments
Hi @Hamza-Akva thanks for reporting this. I was trying to reproduce it on iPhone 12 with iOS 15.5 and iPhone 11 with iOS 17.2 and it works perfectly fine. Is it happening only on certain mapType? Also can you try to reproduce it without onPanDrag prop? Because maybe something in this function is causing this problem and I don't know whats your function body is. And if you can please remove all props non necessary to reproduce this bug, it will be easier for us to reproduce, and fix it. |
Hi can you help check react native maps with expo sdk50 when using googlePlaySerivce 21 map can not move in android only |
trim.4BFA8BB9-6D7B-4329-B719-C303C4DD66EA.MOV |
Hi @chanphiromsok can you open your own issue with full description and source code? Or if it's exactly the same case please provide your code here |
Hi I have been testing on new project is work fine it maybe conflict with some deps install I will create reproduce repo sample for you because it's a private project |
@mateki0 Hi I figure out the issue is I used MapView in the Context and Wrap my whole Navigation inside it after removed it work fined now not freeze <BackgroundGeolocationContext.Provider value={{ listen }}>
{children}
<MapView
liteMode
style={{ display: 'none' }}
showsUserLocation={appstate === 'active'}
userLocationUpdateInterval={500}
showsBuildings={false}
showsCompass={false}
showsScale={false}
showsPointsOfInterest={false}
onUserLocationChange={onUserLocationChange}
/>
</BackgroundGeolocationContext.Provider> |
now I remove |
@chanphiromsok does it work fine with liteMode and without your context? If so can you put here the code from this context? |
sorry I did not test that case but without context map view using liteMode it work fine on other screens |
So do you need any help from our side? Because I'm a bit lost here now |
no I didn't have the problem like you please share your environment |
please try create with fresh project and test it |
I'm running into the same problem with my Expo project, running it in Expo Go on native Apple Maps. Zooming in beyond maxZoomLevel is fine, but zooming out beyond minZoomLevel causes the map to return to that level, realign north, and freeze, rejecting all inputs until I go back a screen and relaunch it. |
I've been able to get the bug to replicate all the way down to a minimal case of import { StyleSheet } from "react-native";
import MapView from "react-native-maps";
export default function MyMapView(props) {
return (
<MapView
style={{...StyleSheet.absoluteFillObject}}
maxZoomLevel={18}
minZoomLevel={10}>
</MapView>
)
} running on an iPhone 15, which makes me guess it's either an inherent bug, or something wrong with react-native-maps' interactions with Expo/Expo Go? |
@Hamza-Akva @m-peeler @chanphiromsok we've introduced cameraZoomRange for iOS recently to solve this issue natively, previously a custom code was used and it was buggy in some corner cases, including this one. see: https://github.com/react-native-maps/react-native-maps/blob/master/docs/mapview.md |
Summary
Map screen getting freeze when user try to zoom out less then minZoomLevel. working fine on Iphone 14 or above and map screen getting freeze on iphone 13, iphone 12, iphone 11, iphone x
Reproducible sample code
Steps to reproduce
try to zoom out he screen more than the minimum zoom level
Expected result
i am expect that the map will working fine
Actual result
map screen getting freeze
React Native Maps Version
What platforms are you seeing the problem on?
iOS (Apple Maps)
React Native Version
react-native": "0.72.4
What version of Expo are you using?
Not using Expo
Device(s)
Iphone 12 pro
Additional information
No response
The text was updated successfully, but these errors were encountered: