software-mansion-labs / expo-maps

81 stars 3 forks source link

Camera Animations for Google and Apple Maps #93

Closed behenate closed 1 year ago

behenate commented 2 years ago

Camera Move

Functionality

Type animation is done by accessing the map ref and calling ref.current.moveCamera(CameraMove) . The CameraMove type consists of values:

The type is similar to CameraPosition, but all fields except for duration and animate are optional. If any of the fields is left as null the camera will keep the current value of that position parameter. When both latLngDelta is set the bearing, tilt, zoom fields will be ignored, and the camera will move to smallest view containing a bounding box created around the target by latLngDelta.latitudeDelta and latLngDelta.longitudeDelta (target is in the center of the box).

Due to platform differences zoom might provide a slightly different view for Apple Maps and Google Maps, since a conversion is needed from Google Maps’ zoom to Apple Maps’ altitude

https://user-images.githubusercontent.com/31368152/187242031-42e7d294-c265-4e6f-a135-fdabf6c1b1a9.mp4

catalinmiron commented 1 year ago

🚀