Skip to content

Commit 8119549

Browse files
committed
Added google api token as a parameter for the request.
1 parent 0b0f6b1 commit 8119549

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

SVGeocoder/SVGeocoder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ typedef void (^SVGeocoderCompletionHandler)(NSArray *placemarks, NSHTTPURLRespon
3636

3737
- (SVGeocoder*)initWithCoordinate:(CLLocationCoordinate2D)coordinate completion:(SVGeocoderCompletionHandler)block;
3838

39+
- (void)setGoogleMapsToken:(NSString*)token;
3940
- (void)start;
4041
- (void)cancel;
4142

SVGeocoder/SVGeocoder.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ - (SVGeocoder*)initWithAddress:(NSString *)address region:(CLRegion *)region com
116116
return [self initWithParameters:parameters completion:block];
117117
}
118118

119+
- (void)setGoogleMapsToken:(NSString *)token {
120+
121+
[self addParametersToRequest:[@{@"token": token} mutableCopy]];
122+
123+
}
119124

120125
#pragma mark - Private Utility Methods
121126

0 commit comments

Comments
 (0)