diff --git a/README.md b/README.md index 23e2ef6..97705e0 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ catch(err) { ``` ## Geocoding object format -both iOS and Android will return the following object: +Android will return the following object: ```js { @@ -138,6 +138,15 @@ both iOS and Android will return the following object: } ``` +iOS will return that same object plus water feature data: + +```js +{ + ocean: String | null, + inlandWater: String | null +} +``` + ## Notes ### iOS diff --git a/ios/RNGeocoder/RNGeocoder.m b/ios/RNGeocoder/RNGeocoder.m index 1a54347..4597bee 100644 --- a/ios/RNGeocoder/RNGeocoder.m +++ b/ios/RNGeocoder/RNGeocoder.m @@ -109,7 +109,9 @@ - (NSArray *)placemarksToDictionary:(NSArray *)placemarks { @"postalCode": placemark.postalCode ?: [NSNull null], @"adminArea": placemark.administrativeArea ?: [NSNull null], @"subAdminArea": placemark.subAdministrativeArea ?: [NSNull null], - @"formattedAddress": [lines componentsJoinedByString:@", "] ?: [NSNull null] + @"formattedAddress": [lines componentsJoinedByString:@", "] ?: [NSNull null], + @"inlandWater": placemark.inlandWater ?: [NSNull null], + @"ocean": placemark.ocean ?: [NSNull null] }; [results addObject:result];