dor506
dor506

Reputation: 5414

GMSMapView - Mimic camera animation like Google Maps Application

I'm implementing google maps sdk in my app.

However, the build in map animation is not even close to be like the animation which can be seen in Google Maps application.

The animation in Google Maps application is very smooth and modest. The build in map animation is very jumpy and aggressive.

The animation code is:

let newPosition = GMSCameraPosition.camera(withTarget: location, zoom: self.defaultZoom)
self.mapView.animate(to: newPosition)

Upvotes: 1

Views: 186

Answers (1)

Nikdemm
Nikdemm

Reputation: 637

With the Core animation you can control not only Duration, also you can setup timing function(kCATransactionAnimationTimingFunction) and you can use function few provided by Apple (EaseIn/EaseOut etc) or you can make custom functions like this

Upvotes: 1

Related Questions