-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix(AIRMap): include map rotation in zoom computing & fix flyovers maps zoom constrains [take II] #4905
fix(AIRMap): include map rotation in zoom computing & fix flyovers maps zoom constrains [take II] #4905
Conversation
d470de6
to
d3055c1
Compare
@salah-ghanim this is take two of closed PR #4892 |
@jan-kozinski thanks a lot for re-submitting the pull request. I added couple of comments that I think need to be addressed before merging the code. specifically I believe there is a way to implement max/min zoom based on having a setter function for both properties and calculating how much that would be in meters (based on screen dimensions). let me know if you can take care of that or if I should try to do it myself. |
@salah-ghanim Hi, I can't find the comments, perhaps you didn't submit the review yet? :D I'll do my best to address them, though I'm not sure how to compute the distance in meters based on screen dimensions. |
@jan-kozinsk you should be able to see all comments in the "files changed" tab of the pull request. |
Screen.Recording.2023-12-18.at.15.47.52.mov |
Hi @salah-ghanim I still can't find the comments, even under the files changed tab :/. I've included a recording in my previous mesage |
@salah-ghanim I don't see your comments either. Would be happy to help with this PR :) |
@jan-kozinski @ahinkle strange that you guys don't see the feedback, I see it even in guest mode: anyhow I also included screenshots of the comments so that you see my feedback ![]() ![]() ![]() |
@jan-kozinski thank you so much for the new pull request, but I realised that:
doesn't set with me well. but good news I see the way forward and it's much simpler that what we're trying to do.
if such values are provided you can set the MapKit camera zoom range using those and avoid the use of the current zoom logic
by "current logic" I mean the current one in the library not the one in this pull request. maybe to summarise again:
|
@jan-kozinski thanks for the new update some tiny feedback:
once done I think we can finally merge :) |
… into fix/flyover-maps-zoom-take-II
Done @salah-ghanim. I didn't use the |
## [1.10.2](v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](#4905)) ([d83e1a9](d83e1a9))
🎉 This PR is included in version 1.10.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I'm still seeing this bug on the Screen.Recording.2024-02-10.at.9.17.23.PM.mov |
Hi @ahinkle I think you're using Expo. If so, you have to rebuild your project, not only update the library and start |
## [1.10.2](react-native-maps/react-native-maps@v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](react-native-maps/react-native-maps#4905)) ([d83e1a9](react-native-maps/react-native-maps@d83e1a9))
## [1.10.2](react-native-maps/react-native-maps@v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](react-native-maps/react-native-maps#4905)) ([d83e1a9](react-native-maps/react-native-maps@d83e1a9))
## [1.10.2](react-native-maps/react-native-maps@v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](react-native-maps/react-native-maps#4905)) ([d83e1a9](react-native-maps/react-native-maps@d83e1a9))
## [1.10.2](react-native-maps/react-native-maps@v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](react-native-maps/react-native-maps#4905)) ([d83e1a9](react-native-maps/react-native-maps@d83e1a9))
## [1.10.2](react-native-maps/react-native-maps@v1.10.1...v1.10.2) (2024-02-10) ### Bug Fixes * **AIRMap:** support iOS MapKit zoomConstraints for better zoom handling especially for 3d maps ([#4905](react-native-maps/react-native-maps#4905)) ([d83e1a9](react-native-maps/react-native-maps@d83e1a9))
Does any other open PR do the same thing?
No
What issue is this PR fixing?
#4880
The zoom limit algorithm does not take map rotation into account and also it does not work for flyover maps. Flyover maps are not typed and not documented.
How did you test this PR?
iPhone 14 Pro simulator, I logged the zoom values with NSLog. The new algorithm produced same zoom values as the old one did when map was not rotated. When the map was rotated, the old algorithm tended to be unpredictable.