-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathSVGeocoder.h
More file actions
44 lines (31 loc) · 1.4 KB
/
SVGeocoder.h
File metadata and controls
44 lines (31 loc) · 1.4 KB
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
//
// SVGeocoder.h
//
// Created by Sam Vermette on 07.02.11.
// Copyright 2011 samvermette.com. All rights reserved.
//
// https://github.com/samvermette/SVGeocoder
// http://code.google.com/apis/maps/documentation/geocoding/
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "SVPlacemark.h"
typedef enum {
SVGeocoderZeroResultsError = 1,
SVGeocoderOverQueryLimitError,
SVGeocoderRequestDeniedError,
SVGeocoderInvalidRequestError,
SVGeocoderJSONParsingError
} SVGecoderError;
typedef void (^SVGeocoderCompletionHandler)(NSArray *placemarks, NSHTTPURLResponse *urlResponse, NSError *error);
@interface SVGeocoder : NSOperation
+ (SVGeocoder*)geocode:(NSString *)address completion:(SVGeocoderCompletionHandler)block;
+ (SVGeocoder*)geocode:(NSString *)address region:(CLCircularRegion *)region completion:(SVGeocoderCompletionHandler)block;
+ (SVGeocoder*)reverseGeocode:(CLLocationCoordinate2D)coordinate completion:(SVGeocoderCompletionHandler)block;
- (SVGeocoder*)initWithAddress:(NSString *)address completion:(SVGeocoderCompletionHandler)block;
- (SVGeocoder*)initWithAddress:(NSString *)address region:(CLCircularRegion *)region completion:(SVGeocoderCompletionHandler)block;
- (SVGeocoder*)initWithCoordinate:(CLLocationCoordinate2D)coordinate completion:(SVGeocoderCompletionHandler)block;
- (void)start;
- (void)cancel;
+ (void)setLanguage:(NSString *)language;
@end