Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do marker animations exist on GoogleMaps SDK for iOS?

Is it possible to move/rotate GMSMarker on GMSMapView with animation?

like image 674
Denis Avatar asked Jan 19 '13 13:01

Denis


2 Answers

The addition in 1.2 is that the GMSMarker class has an animated property - I presume you just set it to YES, before adding the marker to the map by settings its map property (I haven't tried it though).

https://developers.google.com/maps/documentation/ios/reference/interface_g_m_s_marker

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.8683, 151.2086);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.animated = YES;
marker.map = mapView_;

I presume this means that the marker will be animated when it is dropped onto the map - not that you can make a high-speed animated marker like this original question was asking.

like image 105
Saxon Druce Avatar answered Oct 12 '22 13:10

Saxon Druce


No I'm afraid they are not as we have no access to the OpenGL context that Google Maps has access to. The best you can do is rotate a marker as a UIImage which requires a redraw or you can move a marker but it will jump unless you do it in very small increments!

I suggest reporting a bug to Google and they may be able to include it

like image 34
Lee Armstrong Avatar answered Oct 12 '22 12:10

Lee Armstrong