void ReleaseDesignerOutlets() { if (MKMapViewBusinessLines != null) { MKMapViewBusinessLines.Dispose(); MKMapViewBusinessLines = null; } if (UILabelClientsTitle != null) { UILabelClientsTitle.Dispose(); UILabelClientsTitle = null; } }
public void LoadMap() { try { MKPointAnnotation Annotation = new MKPointAnnotation(); CLLocationCoordinate2D AnnotationCoordinates = new CLLocationCoordinate2D(LocationLatitude, LocationLongitude); Annotation.Title = AnnotationTitle; Annotation.Coordinate = AnnotationCoordinates; MKMapViewBusinessLines.AddAnnotation(Annotation); CLLocationCoordinate2D LocationCoordinate = new CLLocationCoordinate2D(LocationLatitude, LocationLongitude); MKCoordinateSpan coordinateSpan = new MKCoordinateSpan(5, 5); MKCoordinateRegion coordinateRegion = new MKCoordinateRegion(LocationCoordinate, coordinateSpan); MKMapViewBusinessLines.SetRegion(coordinateRegion, true); } catch (Exception ex) { } }