Guest User

Untitled

a guest
Oct 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. DispatchQueue.main.async {
  2. for _ in self.lat{
  3. self.rotateMarker(coordinates: CLLocationCoordinate2DMake(self.lat[count], self.lon[count]), degrees: 0, duration: 3.0 )
  4. count += 1
  5. }
  6. }
  7.  
  8. func rotateMarker(coordinates: CLLocationCoordinate2D, degrees: CLLocationDegrees, duration: Double) {
  9.  
  10. // Movement
  11. CATransaction.begin()
  12. CATransaction.setAnimationDuration(duration)
  13. rotatingMarker.position = coordinates
  14.  
  15. // Center Map View
  16. let camera = GMSCameraUpdate.setTarget(coordinates)
  17. mapView.animate(with: camera)
  18.  
  19. CATransaction.commit()
  20. }
Add Comment
Please, Sign In to add comment