react-native-radar 3.8.8 → 3.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@ android {
18
18
  minSdkVersion 16
19
19
  targetSdkVersion 31
20
20
  versionCode 1
21
- versionName '3.8.8'
21
+ versionName '3.8.9'
22
22
  }
23
23
  lintOptions {
24
24
  abortOnError false
@@ -45,5 +45,5 @@ repositories {
45
45
 
46
46
  dependencies {
47
47
  api 'com.facebook.react:react-native:+'
48
- api 'io.radar:sdk:3.8.9'
48
+ api 'io.radar:sdk:3.8.10'
49
49
  }
@@ -915,7 +915,9 @@ public class RNRadarModule extends ReactContextBaseJavaModule implements Permiss
915
915
  String country = optionsMap.hasKey("countryCode") ? optionsMap.getString("countryCode") : optionsMap.hasKey("country") ? optionsMap.getString("country") : null;
916
916
  String[] layers = optionsMap.hasKey("layers") ? RNRadarUtils.stringArrayForArray(optionsMap.getArray("layers")) : null;
917
917
 
918
- Radar.autocomplete(query, near, layers, limit, country, new Radar.RadarGeocodeCallback() {
918
+ boolean expandUnits = optionsMap.hasKey("expandUnits") ? optionsMap.getBoolean("expandUnits") : false;
919
+
920
+ Radar.autocomplete(query, near, layers, limit, country, expandUnits,new Radar.RadarGeocodeCallback() {
919
921
  @Override
920
922
  public void onComplete(@NonNull Radar.RadarStatus status, @Nullable RadarAddress[] addresses) {
921
923
  if (status == Radar.RadarStatus.SUCCESS) {
@@ -1 +1 @@
1
- github "radarlabs/radar-sdk-ios" "3.8.6"
1
+ github "radarlabs/radar-sdk-ios" "3.8.7"
package/ios/RNRadar.m CHANGED
@@ -787,10 +787,16 @@ RCT_EXPORT_METHOD(autocomplete:(NSDictionary *)optionsDict resolve:(RCTPromiseRe
787
787
  country = optionsDict[@"country"];
788
788
  }
789
789
 
790
+ BOOL expandUnits = false;
791
+ NSNumber *expandUnitsNumber = optionsDict[@"expandUnits"];
792
+ if (expandUnitsNumber != nil && [expandUnitsNumber isKindOfClass:[NSNumber class]]) {
793
+ expandUnits = [expandUnitsNumber boolValue];
794
+ }
795
+
790
796
  __block RCTPromiseResolveBlock resolver = resolve;
791
797
  __block RCTPromiseRejectBlock rejecter = reject;
792
798
 
793
- [Radar autocompleteQuery:query near:near layers:layers limit:limit country:country completionHandler:^(RadarStatus status, NSArray<RadarAddress *> * _Nullable addresses) {
799
+ [Radar autocompleteQuery:query near:near layers:layers limit:limit country:country expandUnits:expandUnits completionHandler:^(RadarStatus status, NSArray<RadarAddress *> * _Nullable addresses) {
794
800
  if (status == RadarStatusSuccess && resolver) {
795
801
  NSMutableDictionary *dict = [NSMutableDictionary new];
796
802
  [dict setObject:[Radar stringForStatus:status] forKey:@"status"];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "React Native module for Radar, the leading geofencing and location tracking platform",
4
4
  "homepage": "https://radar.com",
5
5
  "license": "Apache-2.0",
6
- "version": "3.8.8",
6
+ "version": "3.8.9",
7
7
  "main": "js/index.js",
8
8
  "files": [
9
9
  "android",
@@ -15,5 +15,5 @@ Pod::Spec.new do |s|
15
15
  s.platform = :ios, "10.0"
16
16
 
17
17
  s.dependency "React"
18
- s.dependency "RadarSDK", "~> 3.8.6"
18
+ s.dependency "RadarSDK", "~> 3.8.7"
19
19
  end