1010#import < CoreLocation/CoreLocation.h>
1111#import " LMAddress.h"
1212
13+ NS_ASSUME_NONNULL_BEGIN
14+
1315/* !
1416 * LMGeocoder service API.
1517 */
@@ -50,12 +52,12 @@ typedef void (^LMGeocodeCallback) (NSArray<LMAddress *> * _Nullable results, NS
5052/* !
5153 * Get shared instance.
5254 */
53- + (nonnull LMGeocoder *)sharedInstance ;
55+ + (LMGeocoder *)sharedInstance ;
5456
5557/* !
5658 * Convenience constructor for LMGeocoder.
5759 */
58- + (nonnull LMGeocoder *)geocoder ;
60+ + (LMGeocoder *)geocoder ;
5961
6062/* !
6163 * Submits a forward-geocoding request using the specified string.
@@ -67,10 +69,23 @@ typedef void (^LMGeocodeCallback) (NSArray<LMAddress *> * _Nullable results, NS
6769 * @param service The service API used to geocode.
6870 * @param handler The callback to invoke with the geocode results. The callback will be invoked asynchronously from the main thread.
6971 */
70- - (void )geocodeAddressString : (nonnull NSString *)addressString
72+ - (void )geocodeAddressString : (NSString *)addressString
7173 service : (LMGeocoderService)service
7274 completionHandler : (nullable LMGeocodeCallback)handler ;
7375
76+ /* !
77+ * Submits a synchronous forward-geocoding request using the specified string.
78+ *
79+ * @param addressString The string describing the location you want to look up.
80+ * @param service The service API used to geocode.
81+ * @param error The error.
82+ *
83+ * @return The geocode results.
84+ */
85+ - (nullable NSArray *)geocodeAddressString : (NSString *)addressString
86+ service : (LMGeocoderService)service
87+ error : (NSError **)error ;
88+
7489/* !
7590 * Submits a reverse-geocoding request for the specified coordinate.
7691 * After initiating a reverse-geocoding request, do not attempt to initiate another reverse- or forward-geocoding request.
@@ -85,9 +100,24 @@ typedef void (^LMGeocodeCallback) (NSArray<LMAddress *> * _Nullable results, NS
85100 service : (LMGeocoderService)service
86101 completionHandler : (nullable LMGeocodeCallback)handler ;
87102
103+ /* !
104+ * Submits a synchronous reverse-geocoding request for the specified coordinate.
105+ *
106+ * @param coordinate The coordinate to look up.
107+ * @param service The service API used to geocode.
108+ * @param error The error.
109+ *
110+ * @return The reverse geocode results.
111+ */
112+ - (nullable NSArray *)reverseGeocodeCoordinate : (CLLocationCoordinate2D)coordinate
113+ service : (LMGeocoderService)service
114+ error : (NSError **)error ;
115+
88116/* !
89117 * Cancels a pending geocoding request.
90118 */
91119- (void )cancelGeocode ;
92120
93121@end
122+
123+ NS_ASSUME_NONNULL_END
0 commit comments