Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 52 additions & 11 deletions Classes/ios/YandexGeocoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import <CoreLocation/CoreLocation.h>
#import "AFNetworking.h"

#define kYandexGeocoderBaseUrl @"http://geocode-maps.yandex.ru"
#define kYandexGeocoderBaseUrl @"https://geocode-maps.yandex.ru/"
#define kYandexGeocoderEarthRadius 6371000.01

@class YandexGeocoderClient;
Expand All @@ -14,15 +14,56 @@

- (void)cancelAllRequestsForDelegate:(id)delegate;

- (void)reversedGeocodingForLatitude:(double)latitude longitude:(double)longitude success:(void (^)(AFHTTPRequestOperation *operation, id responseObject, NSDictionary *places))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure owner:(id)owner;

- (void)reversedGeocodingForLatitude:(double)latitude longitude:(double)longitude language:(NSString *)language success:(void (^)(AFHTTPRequestOperation *operation, id responseObject, NSDictionary *places))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure owner:(id)owner;

- (void)reversedGeocodingForLatitude:(double)latitude longitude:(double)longitude language:(NSString *)language kind:(NSString *)kind success:(void (^)(AFHTTPRequestOperation *operation, id responseObject, NSDictionary *places))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure owner:(id)owner;

- (void)forwardGeocoding:(NSString *)address success:(void (^)(AFHTTPRequestOperation *operation, id responseObject, NSDictionary *places))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure owner:(id)owner;

- (void)forwardGeocoding:(NSString *)address limitCenterLat:(double)limitCenterLat limitCenterLng:(double)limitCenterLng radius:(double)radius limitToBounds:(BOOL)limitToBounds language:(NSString *)language success:(void (^)(AFHTTPRequestOperation *operation, id responseObject, NSDictionary *places))success failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure owner:(id)owner;
- (void)reversedGeocodingForLatitude:(double)latitude
longitude:(double)longitude
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
owner:(id)owner;

- (void)reversedGeocodingForLatitude:(double)latitude
longitude:(double)longitude
language:(NSString *)language
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
owner:(id)owner;

- (void)reversedGeocodingForLatitude:(double)latitude
longitude:(double)longitude
language:(NSString *)language
kind:(NSString *)kind
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
owner:(id)owner;

- (void)forwardGeocoding:(NSString *)address
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
owner:(id)owner;

- (void)forwardGeocoding: (NSString*) address
language: (NSString*) language
success: (void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary* places)) success
failure: (void (^)(NSURLSessionDataTask *task, NSError* error)) failure
owner: (id) owner;

- (void)forwardGeocoding:(NSString *)address
limitCenterLat:(double)limitCenterLat
limitCenterLng:(double)limitCenterLng
radius:(double)radius
limitToBounds:(BOOL)limitToBounds
language:(NSString *)language
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure owner:(id)owner;

- (void)forwardGeocoding:(NSString *)address
limitCenterLat:(double)limitCenterLat
limitCenterLng:(double)limitCenterLng
limitSpanLat:(double)spanLat
limitSpanLng:(double)spanLng
limitToBounds:(BOOL)limitToBounds
language:(NSString *)language
success:(void (^)(NSURLSessionDataTask *task, id responseObject, NSDictionary *places))success
failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure owner:(id)owner;

+ (CLLocation *)locationFromObject:(NSDictionary *)object;

Expand All @@ -32,4 +73,4 @@

+ (NSString *)placeTypeFromObject:(NSDictionary *)object;

@end
@end
Loading