public void DeselectAnnotation(CKAnnotation annotation, bool animated) { if (annotation == this.SelectedAnnotation) { this.SelectAnnotation(null, animated); } }
public void RemoveAnnotation(CKAnnotation annotation) { var _annotations = this.Annotations; _annotations.Remove(annotation); this.Annotations = _annotations; }
public override void RemoveAnnotation(CKAnnotation annotation) { if (annotation.Cluster == this) { base.RemoveAnnotation(annotation); this.SetCoordinate(this.CoordinateByRemovingAnnotation(annotation)); } }
public virtual void RemoveAnnotation(CKAnnotation annotation) { if (annotation.Cluster == this) { this.Annotations.Remove(annotation); annotation.Cluster = null; } }
public override void AddAnnotation(CKAnnotation annotation) { if (annotation.Cluster != this) { var index = this.Annotations.IndexOf(annotation); this.Annotations.Insert(index, annotation); this.SetCoordinate(this.Annotations[0].Coordinate); } }
public override void RemoveAnnotation(CKAnnotation annotation) { if (annotation.Cluster == this) { this.Annotations.Remove(annotation); annotation.Cluster = null; this.SetCoordinate(this.Annotations[0].Coordinate); } }
public bool AnnotationTree(ICKAnnotationTree annotationTree, CKAnnotation annotation) { if (annotation == this.SelectedAnnotation) { return(false); } return(this.Delegate?.ClusterManager(this, annotation) ?? true); }
public override void AddAnnotation(CKAnnotation annotation) { if (annotation.Cluster != this) { annotation.Cluster = this; this.Annotations.Add(annotation); this.center = this.CoordinateByAddingAnnotation(annotation); this.SetCoordinate(this.CoordinateByDistanceSort()); } }
public override void RemoveAnnotation(CKAnnotation annotation) { if (annotation.Cluster == this) { this.Annotations.Remove(annotation); annotation.Cluster = null; this.center = this.CoordinateByRemovingAnnotation(annotation); this.SetCoordinate(this.CoordinateByDistanceSort()); } }
protected CLLocationCoordinate2D CoordinateByRemovingAnnotation(CKAnnotation annotation) { if (this.Annotations.Count < 1) { return(new CLLocationCoordinate2D()); } double lat = this.Coordinate.Latitude * (this.Annotations.Count + 1); double lon = this.Coordinate.Longitude * (this.Annotations.Count + 1); lat -= annotation.Coordinate.Latitude; lon -= annotation.Coordinate.Longitude; return(new CLLocationCoordinate2D(lat / this.Annotations.Count, lon / this.Annotations.Count)); }
protected CLLocationCoordinate2D CoordinateByAddingAnnotation(CKAnnotation annotation) { if (this.Annotations.Count < 2) { return(annotation.Coordinate); } double lat = this.Coordinate.Latitude * (this.Annotations.Count - 1); double lon = this.Coordinate.Longitude * (this.Annotations.Count - 1); lat += annotation.Coordinate.Latitude; lon += annotation.Coordinate.Longitude; return(new CLLocationCoordinate2D(lat / this.Annotations.Count, lon / this.Annotations.Count)); }
public void SelectAnnotation(CKAnnotation annotation, bool animated, CKCluster cluster = null) { if (annotation != null) { if (annotation.Cluster == null || annotation.Cluster.Annotations.Count > 1) { cluster = this.Algorithm.ClusterWithCoordinate(annotation.Coordinate); cluster.AddAnnotation(annotation); this.map.AddCluster(cluster); } else { cluster = annotation.Cluster; } } this.SetSelectedCluster(cluster, animated); }
public void AddAnnotation(CKAnnotation annotation) { this.Annotations.Add(annotation); this.Annotations = this.Annotations; }
public override void AddAnnotation(CKAnnotation annotation) { base.AddAnnotation(annotation); this.SetCoordinate(this.CoordinateByAddingAnnotation(annotation)); }
public virtual void AddAnnotation(CKAnnotation annotation) { annotation.Cluster = this; this.Annotations.Add(annotation); }