iOS GoogleMaps SDK - animateToCameraPosition animation finished handler?

Robert Weindl picture Robert Weindl · Mar 4, 2013 · Viewed 10.6k times · Source

Currently I am using the GoogleMaps SDK for iOS for various operations. When calling

[self.googleMapsView animateToCameraPosition:[GMSCameraPosition 
                            cameraWithLatitude:LATITUDE
                                     longitude:LONGITUDE
                                          zoom:ZOOM]];

is there a completion handler to determine wether the animation finished or not?

Of course I get with the GMSMapViewDelegate updates about the cameraPosition but how should I check if the animation finished?

- (void)mapView:(GMSMapView *)mapView 
didChangeCameraPosition:(GMSCameraPosition *)position;

Answer

tony m picture tony m · Jul 27, 2013

For the reference of future readers of this post, Google Maps SDK for iOS Version 1.4.0 released in July 2013 has added a new delegate method mapView:idleAtCameraPosition: which will be fired at the end of any camera movement - be it programatic animation like in this question or user triggered movements.