forked from netj/LocateMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocateMe.h
43 lines (31 loc) · 1.24 KB
/
LocateMe.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
//
// LocateMe.h
//
// Created by Robert Harder on 10/22/10.
// Copyright 2010 Robert Harder. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <CoreLocation/CoreLocation.h>
#import <stdio.h>
const int MAX_RETRIES = 100;
BOOL g_verbose = NO;
NSString *VERSION = @"0.2";
NSString *GOOGLE_URL_FORMAT = @"http://maps.google.com/maps?q={LAT},{LON}({HOST},+{TIME})&ie=UTF8&ll={LAT},{LON}&t=roadmap&z=14&iwloc=A&mrt=loc";
NSString *LONG_FORMAT = @"Latitude: {LAT}\nLongitude: {LON}\nAltitude (m): {ALT}\nSpeed (m/s): {SPD}\nDirection: {DIR}\nHorizontal Accuracy (m): {HAC}\nVertical Accuracy (m): {VAC}\nTimestamp: {TIME}\nHostname: {HOST}";
@interface LocateMe : NSObject <CLLocationManagerDelegate> {
CLLocationManager *locationManager;
NSMutableArray *locationMeasurements;
CLLocation * bestEffortAtLocation;
NSString *userFormat;
BOOL goodLocationFound;
BOOL outputAsGoogleURL;
}
@property (nonatomic) BOOL goodLocationFound;
@property (nonatomic) BOOL outputAsGoogleURL;
@property (nonatomic, retain) NSString *userFormat;
@property (nonatomic, retain) CLLocation *bestEffortAtLocation;
-(id) init;
-(void) dealloc;
-(void) stopUpdatingLocation;
-(void) outputLocation:(CLLocation *) loc asGoogleURL:(BOOL) asGoogle;
@end