Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DispatchQueue.main.async {
- for _ in self.lat{
- self.rotateMarker(coordinates: CLLocationCoordinate2DMake(self.lat[count], self.lon[count]), degrees: 0, duration: 3.0 )
- count += 1
- }
- }
- func rotateMarker(coordinates: CLLocationCoordinate2D, degrees: CLLocationDegrees, duration: Double) {
- // Movement
- CATransaction.begin()
- CATransaction.setAnimationDuration(duration)
- rotatingMarker.position = coordinates
- // Center Map View
- let camera = GMSCameraUpdate.setTarget(coordinates)
- mapView.animate(with: camera)
- CATransaction.commit()
- }
Add Comment
Please, Sign In to add comment