Esempio n. 1
0
        public static void MoveCluster(this MKMapView map, CKCluster cluster, CLLocationCoordinate2D from, CLLocationCoordinate2D to, UICompletionHandler completion)
        {
            cluster.SetCoordinate(from);

            if (GetClusterManager(map).Delegate != null)
            {
                GetClusterManager(map).Delegate.ClusterManager(GetClusterManager(map), () => { cluster.SetCoordinate(to); }, completion);
            }
            else
            {
                UIView.Animate(GetClusterManager(map).AnimationDuration,
                               0,
                               GetClusterManager(map).AnimationOptions,
                               () => { cluster.SetCoordinate(to); },
                               () => completion?.Invoke(true));
            }
        }