-
Notifications
You must be signed in to change notification settings - Fork 1
/
LocationSelectionViewController.h
76 lines (60 loc) · 2.49 KB
/
LocationSelectionViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//
// LocationSelectionViewController.h
// MilesTracker
//
// Created by Mike Glazer on 3/18/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "BSForwardGeocoder.h"
#import "UITableAlert.h"
@class CLLocation;
@protocol LocationSelectionViewDelegate;
@protocol CLLocationManagerDelegate;
@class BSForwardGeocoder;
@class EventLocationMapAnnotation;
@interface LocationSelectionViewController : UIViewController <MKMapViewDelegate, UISearchBarDelegate, CLLocationManagerDelegate, BSForwardGeocoderDelegate, UIAlertViewDelegate, UITableAlertDelegate, MKReverseGeocoderDelegate> {
MKMapView* mapView;
id<LocationSelectionViewDelegate> delegate;
CLLocationManager* locationManager;
BSForwardGeocoder* forwardGeocoder;
EventLocationMapAnnotation* currentAnnotation;
NSString* existingAddress;
CLLocationCoordinate2D existingCoordinate;
CLLocationCoordinate2D selectedCoordinate;
NSString* selectedAddress;
UISearchBar* addressSearchBar;
UIBarButtonItem* cancelButton;
UIBarButtonItem* acceptButton;
UIBarButtonItem* clearMapEntryButton;
UIBarButtonItem* cancelMapEntryButton;
UIBarButtonItem* updateLocationButton;
UIBarButtonItem* findingLocationButton;
UIToolbar* toolbar;
UIImage* coordinateSelectionImage;
}
@property (nonatomic,retain) IBOutlet MKMapView* mapView;
@property (nonatomic,retain) id<LocationSelectionViewDelegate> delegate;
@property (nonatomic,retain) IBOutlet UISearchBar* addressSearchBar;
@property (nonatomic,retain) CLLocationManager* locationManager;
@property (nonatomic,retain) BSForwardGeocoder* forwardGeocoder;
@property (nonatomic,retain) EventLocationMapAnnotation* currentAnnotation;
@property (nonatomic,copy) NSString* existingAddress;
@property (nonatomic,assign) CLLocationCoordinate2D existingCoordinate;
@property (nonatomic,copy) NSString* selectedAddress;
@property (nonatomic,assign) CLLocationCoordinate2D selectedCoordinate;
@property (nonatomic,retain) UIBarButtonItem* updateLocationButton;
@property (nonatomic,retain) IBOutlet UIToolbar* toolbar;
- (void)findCurrentLocationClicked;
- (void)accept;
- (void)cancel;
- (void)cancelMapSelect;
- (void)addAnnotationAtLocation:(CLLocationCoordinate2D)coordinate withAddress:(NSString*)address;
@end
@protocol LocationSelectionViewDelegate
- (void)didAcceptLocationSelection:(CLLocationCoordinate2D)coordinate withAddress:(NSString*)name;
- (void)didCancelLocationSelection;
- (bool)isStartingPoint;
@end